<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />


<meta name="author" content="Yiying Wang" />

<meta name="date" content="2017-03-15" />

<title>Basic Plots 31 - Map</title>

<script src="libs/jquery-1.11.3/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<script src="libs/navigation-1.1/tabsets.js"></script>
<script src="libs/htmlwidgets-0.8/htmlwidgets.js"></script>
<script src="libs/echarts-2.2.7/echarts-all.js"></script>
<script src="libs/charts-ext-2.2.7/main.js"></script>
<script src="libs/charts-ext-2.2.7/BMap.js"></script>
<script src="libs/echarts-binding-0.2/echarts.js"></script>


<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
div.sourceCode { overflow-x: auto; }
table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
  margin: 0; padding: 0; vertical-align: baseline; border: none; }
table.sourceCode { width: 100%; line-height: 100%; }
td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
td.sourceCode { padding-left: 5px; }
code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
code > span.dt { color: #902000; } /* DataType */
code > span.dv { color: #40a070; } /* DecVal */
code > span.bn { color: #40a070; } /* BaseN */
code > span.fl { color: #40a070; } /* Float */
code > span.ch { color: #4070a0; } /* Char */
code > span.st { color: #4070a0; } /* String */
code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
code > span.ot { color: #007020; } /* Other */
code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
code > span.fu { color: #06287e; } /* Function */
code > span.er { color: #ff0000; font-weight: bold; } /* Error */
code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
code > span.cn { color: #880000; } /* Constant */
code > span.sc { color: #4070a0; } /* SpecialChar */
code > span.vs { color: #4070a0; } /* VerbatimString */
code > span.ss { color: #bb6688; } /* SpecialString */
code > span.im { } /* Import */
code > span.va { color: #19177c; } /* Variable */
code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code > span.op { color: #666666; } /* Operator */
code > span.bu { } /* BuiltIn */
code > span.ex { } /* Extension */
code > span.pp { color: #bc7a00; } /* Preprocessor */
code > span.at { color: #7d9029; } /* Attribute */
code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
</style>
<style type="text/css">
  pre:not([class]) {
    background-color: white;
  }
</style>


<style type="text/css">
h1 {
  font-size: 34px;
}
h1.title {
  font-size: 38px;
}
h2 {
  font-size: 30px;
}
h3 {
  font-size: 24px;
}
h4 {
  font-size: 18px;
}
h5 {
  font-size: 16px;
}
h6 {
  font-size: 12px;
}
.table th:not([align]) {
  text-align: left;
}
</style>

<link rel="stylesheet" href="/home/madlogos/R/x86_64-pc-linux-gnu-library/3.3/knitr/misc/vignette.css" type="text/css" />

</head>

<body>

<style type = "text/css">
.main-container {
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
}
code {
  color: inherit;
  background-color: rgba(0, 0, 0, 0.04);
}
img {
  max-width:100%;
  height: auto;
}
.tabbed-pane {
  padding-top: 12px;
}
button.code-folding-btn:focus {
  outline: none;
}
</style>



<div class="container-fluid main-container">

<!-- tabsets -->
<script>
$(document).ready(function () {
  window.buildTabsets("TOC");
});
</script>

<!-- code folding -->






<div class="fluid-row" id="header">



<h1 class="title toc-ignore">Basic Plots 31 - Map</h1>
<h4 class="author"><em>Yiying Wang</em></h4>
<h4 class="date"><em>2017-03-15</em></h4>

</div>

<div id="TOC">
<ul>
<li><a href="#introduction"><span class="toc-section-number">1</span> Introduction</a></li>
<li><a href="#function-call"><span class="toc-section-number">2</span> Function Call</a></li>
<li><a href="#showcase"><span class="toc-section-number">3</span> Showcase</a><ul>
<li><a href="#base-map-mode"><span class="toc-section-number">3.1</span> Base Map Mode</a><ul>
<li><a href="#complete-base-map"><span class="toc-section-number">3.1.1</span> Complete Base Map</a></li>
<li><a href="#partial-base-map"><span class="toc-section-number">3.1.2</span> Partial Base map</a></li>
</ul></li>
<li><a href="#extensive-base-map-mode"><span class="toc-section-number">3.2</span> Extensive Base Map Mode</a><ul>
<li><a href="#multi-select-base-map"><span class="toc-section-number">3.2.1</span> Multi-select Base Map</a></li>
<li><a href="#multiple-maps"><span class="toc-section-number">3.2.2</span> Multiple Maps</a></li>
</ul></li>
<li><a href="#data-map-mode"><span class="toc-section-number">3.3</span> Data Map Mode</a><ul>
<li><a href="#single-series"><span class="toc-section-number">3.3.1</span> Single Series</a></li>
<li><a href="#multiple-series"><span class="toc-section-number">3.3.2</span> Multiple Series</a></li>
<li><a href="#maps-with-timeline"><span class="toc-section-number">3.3.3</span> Maps with Timeline</a></li>
</ul></li>
<li><a href="#extensive-data-map-mode"><span class="toc-section-number">3.4</span> Extensive Data Map Mode</a><ul>
<li><a href="#multi-select-data-map"><span class="toc-section-number">3.4.1</span> Multi-select Data Map</a></li>
<li><a href="#multiple-maps-1"><span class="toc-section-number">3.4.2</span> Multiple Maps</a></li>
</ul></li>
</ul></li>
<li><a href="#futher-setup"><span class="toc-section-number">4</span> Futher Setup</a><ul>
<li><a href="#addoveride-namemap"><span class="toc-section-number">4.1</span> Add/Overide nameMap</a></li>
<li><a href="#addoveride-markline"><span class="toc-section-number">4.2</span> Add/Overide markLine</a><ul>
<li><a href="#addmarkline"><span class="toc-section-number">4.2.1</span> <code>addMarkLine</code></a></li>
<li><a href="#addgeocoord"><span class="toc-section-number">4.2.2</span> <code>addGeoCoord</code></a></li>
</ul></li>
<li><a href="#addoveride-markpoint"><span class="toc-section-number">4.3</span> Add/Overide markPoint</a><ul>
<li><a href="#addmarkpoint"><span class="toc-section-number">4.3.1</span> <code>addMarkPoint</code></a></li>
<li><a href="#addgeocoord-1"><span class="toc-section-number">4.3.2</span> <code>addGeoCoord</code></a></li>
</ul></li>
<li><a href="#addmarkline-and-addmarkpoint"><span class="toc-section-number">4.4</span> <code>addMarkLine</code> And <code>addMarkPoint</code></a></li>
<li><a href="#addoveride-heatmap"><span class="toc-section-number">4.5</span> Add/Overide heatMap</a></li>
</ul></li>
</ul>
</div>

<p>First, you should load <code>recharts</code>:</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(recharts)</code></pre></div>
<div id="introduction" class="section level1">
<h1><span class="header-section-number">1</span> Introduction</h1>
<p>Map includes 4 basic types:</p>
<ul>
<li>China Map</li>
<li>China Map with Multiple Selection</li>
<li>World Map</li>
<li>World Map with Multiple Selection</li>
</ul>
<table id="intro">
<tr>
<td>
<div id="htmlwidget-c788dc577fa0da45cf7b" style="width:400px;height:300px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-c788dc577fa0da45cf7b">{"x":{"series":[{"type":"map","mapType":"china","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"广东","value":1103605,"selected":false},{"name":"江苏","value":1059587,"selected":false},{"name":"山东","value":967419,"selected":false},{"name":"浙江","value":653668,"selected":false},{"name":"河南","value":568786,"selected":false},{"name":"河北","value":478953,"selected":false},{"name":"辽宁","value":466018,"selected":false},{"name":"四川","value":464555,"selected":false},{"name":"湖北","value":445514,"selected":false},{"name":"湖南","value":440328,"selected":false},{"name":"福建","value":391609,"selected":false},{"name":"上海","value":383554,"selected":false},{"name":"北京","value":347249,"selected":false},{"name":"安徽","value":339401,"selected":false},{"name":"内蒙古","value":289274,"selected":false},{"name":"陕西","value":287978,"selected":false},{"name":"天津","value":255950,"selected":false},{"name":"江西","value":255724,"selected":false},{"name":"广西","value":255144,"selected":false},{"name":"黑龙江","value":244829,"selected":false},{"name":"重庆","value":232230,"selected":false},{"name":"吉林","value":224715,"selected":false},{"name":"云南","value":208612,"selected":false},{"name":"山西","value":207714,"selected":false},{"name":"新疆","value":150812,"selected":false},{"name":"贵州","value":150599,"selected":false},{"name":"甘肃","value":111273,"selected":false},{"name":"海南","value":56989,"selected":false},{"name":"宁夏","value":44802,"selected":false},{"name":"青海","value":37460,"selected":false},{"name":"西藏","value":14990,"selected":false}],"name":"GDP"}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"legend":{"show":true,"data":["GDP"],"x":"left","y":"top","orient":"horizontal"},"dataRange":{"show":true,"calculable":true,"itemWidth":6,"selectedMode":true,"x":"left","y":"bottom","orient":"vertical","color":["red","orange","yellow","limegreen","green"],"borderColor":"#ccc","borderWidth":0,"min":14990,"max":1103605},"title":{"text":"China GDP by Provice, 2014","x":"center","y":"bottom","orient":"horizontal"},"theme":"infographic"},"evals":[],"jsHooks":[]}</script>
</td>
<td>
<div id="htmlwidget-16d166aa4bf80ad80112" style="width:400px;height:300px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-16d166aa4bf80ad80112">{"x":{"series":[{"type":"map","mapType":"china","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"广东","value":1103605,"selected":false},{"name":"江苏","value":1059587,"selected":false},{"name":"山东","value":967419,"selected":false},{"name":"浙江","value":653668,"selected":false},{"name":"河南","value":568786,"selected":false},{"name":"河北","value":478953,"selected":false},{"name":"辽宁","value":466018,"selected":false},{"name":"四川","value":464555,"selected":false},{"name":"湖北","value":445514,"selected":false},{"name":"湖南","value":440328,"selected":false},{"name":"福建","value":391609,"selected":false},{"name":"上海","value":383554,"selected":false},{"name":"北京","value":347249,"selected":false},{"name":"安徽","value":339401,"selected":false},{"name":"内蒙古","value":289274,"selected":false},{"name":"陕西","value":287978,"selected":false},{"name":"天津","value":255950,"selected":false},{"name":"江西","value":255724,"selected":false},{"name":"广西","value":255144,"selected":false},{"name":"黑龙江","value":244829,"selected":false},{"name":"重庆","value":232230,"selected":false},{"name":"吉林","value":224715,"selected":false},{"name":"云南","value":208612,"selected":false},{"name":"山西","value":207714,"selected":false},{"name":"新疆","value":150812,"selected":false},{"name":"贵州","value":150599,"selected":false},{"name":"甘肃","value":111273,"selected":false},{"name":"海南","value":56989,"selected":false},{"name":"宁夏","value":44802,"selected":false},{"name":"青海","value":37460,"selected":false},{"name":"西藏","value":14990,"selected":false}],"name":"GDP","selectedMode":"multiple"}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"legend":{"show":true,"data":["GDP"],"x":"left","y":"top","orient":"horizontal"},"dataRange":{"show":true,"calculable":true,"itemWidth":6,"selectedMode":true,"x":"left","y":"bottom","orient":"vertical","color":["red","orange","yellow","limegreen","green"],"borderColor":"#ccc","borderWidth":0,"min":14990,"max":1103605},"title":{"text":"China GDP by Provice, 2014","x":"center","y":"bottom","orient":"horizontal"},"theme":"roma"},"evals":[],"jsHooks":[]}</script>
</td>
</tr>
<tr>
<td>
<div id="htmlwidget-a4bdee575a00fc083ea1" style="width:400px;height:300px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-a4bdee575a00fc083ea1">{"x":{"series":[{"type":"map","mapType":"world","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"United States of America","value":17418925,"selected":false},{"name":"China","value":10380380,"selected":false},{"name":"Japan","value":4616335,"selected":false},{"name":"Germany","value":3859547,"selected":false},{"name":"United Kingdom","value":2945146,"selected":false},{"name":"France","value":2846889,"selected":false},{"name":"Brazil","value":2353025,"selected":false},{"name":"Italy","value":2147952,"selected":false},{"name":"India","value":2049501,"selected":false},{"name":"Russia","value":1857461,"selected":false},{"name":"Canada","value":1788717,"selected":false},{"name":"Australia","value":1444189,"selected":false},{"name":"South Korea","value":1416949,"selected":false},{"name":"Spain","value":1406855,"selected":false},{"name":"Mexico","value":1282725,"selected":false},{"name":"Indonesia","value":888648,"selected":false},{"name":"Netherlands","value":866354,"selected":false},{"name":"Turkey","value":806108,"selected":false},{"name":"Saudi Arabia","value":752459,"selected":false},{"name":"Switzerland","value":712050,"selected":false}],"name":"GDP"}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"legend":{"show":true,"data":["GDP"],"x":"left","y":"top","orient":"horizontal"},"dataRange":{"show":true,"calculable":true,"itemWidth":6,"selectedMode":true,"x":"left","y":"bottom","orient":"vertical","color":["#FF0000","#FFFF00","#00FF00","#00FFFF","#0000FF","#FF00FF"],"borderColor":"#ccc","borderWidth":0,"min":712050,"max":17418925},"title":{"text":"World GDP Top 20, 2014","x":"center","y":"bottom","orient":"horizontal"},"theme":"macarons"},"evals":[],"jsHooks":[]}</script>
</td>
<td>
<div id="htmlwidget-344a9b4d9727089988a2" style="width:400px;height:300px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-344a9b4d9727089988a2">{"x":{"series":[{"type":"map","mapType":"world","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"United States of America","value":17418925,"selected":false},{"name":"China","value":10380380,"selected":false},{"name":"Japan","value":4616335,"selected":false},{"name":"Germany","value":3859547,"selected":false},{"name":"United Kingdom","value":2945146,"selected":false},{"name":"France","value":2846889,"selected":false},{"name":"Brazil","value":2353025,"selected":false},{"name":"Italy","value":2147952,"selected":false},{"name":"India","value":2049501,"selected":false},{"name":"Russia","value":1857461,"selected":false},{"name":"Canada","value":1788717,"selected":false},{"name":"Australia","value":1444189,"selected":false},{"name":"South Korea","value":1416949,"selected":false},{"name":"Spain","value":1406855,"selected":false},{"name":"Mexico","value":1282725,"selected":false},{"name":"Indonesia","value":888648,"selected":false},{"name":"Netherlands","value":866354,"selected":false},{"name":"Turkey","value":806108,"selected":false},{"name":"Saudi Arabia","value":752459,"selected":false},{"name":"Switzerland","value":712050,"selected":false}],"name":"GDP","selectedMode":"multiple"}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"legend":{"show":true,"data":["GDP"],"x":"left","y":"top","orient":"horizontal"},"dataRange":{"show":true,"calculable":true,"itemWidth":6,"selectedMode":true,"x":"left","y":"bottom","orient":"vertical","color":["#FF0000","#FFFF00","#00FF00","#00FFFF","#0000FF","#FF00FF"],"borderColor":"#ccc","borderWidth":0,"min":712050,"max":17418925},"title":{"text":"World GDP Top 20, 2014","x":"center","y":"bottom","orient":"horizontal"},"theme":"macarons2"},"evals":[],"jsHooks":[]}</script>
</td>
</tr>
</table>
<p>The keys are:</p>
<ul>
<li>Base Map Mode:
<ul>
<li>Simply assign <code>type</code> and/or <code>subtype</code> to display the base map</li>
</ul></li>
<li>Data Map Mode:</li>
<li>character <code>x</code>
<ul>
<li><code>x[,1]</code> must be valid geographic names, e.g., ‘United States of America’ instead of ‘USA’ or ‘U.S.’.</li>
</ul></li>
<li>numeric/logical <code>y</code>
<ul>
<li><code>y[,1]</code>: value</li>
<li><code>y[,2]</code>: logical, if is selected. Also allowed to use 1 for TRUE, 0 for FALSE.</li>
</ul></li>
<li>series is mapped to data series</li>
<li>facet is mapped to separate maps, i.e., each level of facet represents a map. The facet variable should also be valid geograhic names.</li>
<li>You can additionally add map data to the echarts object
<ul>
<li><code>addNameMap</code> for geoName mapping/translation;</li>
<li><code>addHeatMap</code> for additional heatmap graph layer</li>
<li><code>addMarkLine</code> or <code>addMarkPoint</code> to add markLines and/or markPoints
<ul>
<li><code>addGeoCoord</code> to define coordinates of the places for markLine and markPoint</li>
</ul></li>
</ul></li>
</ul>
</div>
<div id="function-call" class="section level1">
<h1><span class="header-section-number">2</span> Function Call</h1>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">echartr</span>(data, &lt;x&gt;, &lt;y&gt;, &lt;series&gt;, &lt;facet&gt;, &lt;lng&gt;, &lt;lat&gt;, &lt;t&gt;, &lt;type&gt;, &lt;subtype&gt;)</code></pre></div>
<table>
<colgroup>
<col width="11%" />
<col width="88%" />
</colgroup>
<thead>
<tr class="header">
<th>Arg</th>
<th>Requirement</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p><strong>data</strong></p></td>
<td><p>source data in the form of data.frame</p></td>
</tr>
<tr class="even">
<td><p><strong>x</strong></p></td>
<td><p>character independent variable. Other type will be coerced to factors. Only the first one is accepted if multiple variables are provided. <code>x[,1]</code> must be valid geographic names.</p></td>
</tr>
<tr class="odd">
<td><p><strong>y</strong></p></td>
<td><p>numeric dependent variable. Only the first 2 are accepted if multiple variables are provided. <code>y[,1]</code> acts as the value and <code>y[,2]</code> (logical) represents the status of selected/unselected. It is also allowed to use 1 for TRUE, 0 for FALSE in <code>y[,2]</code>.</p></td>
</tr>
<tr class="even">
<td><p>series</p></td>
<td><p>series variable which will be coerced to factors. Each level of <code>series</code> is treated as a group factor to produce data series. Only the first one is accepted if multiple variables are provided.</p></td>
</tr>
<tr class="odd">
<td><p>facet</p></td>
<td><p>facetting variable which will be coerced to factors. Each level of <code>facet</code> is treated as a subsetting factor to produce separate maps. Only the first one is accepted if multiple variables are provided.</p></td>
</tr>
<tr class="even">
<td><p>t</p></td>
<td><p>timeline variable which will be coerced to factors. Only the first one is accepted if multiple variables are provided.</p></td>
</tr>
<tr class="odd">
<td><p>type</p></td>
<td><p>‘map_world’, ‘map_world_multi’, ‘map_china’, ‘map_china_multi’.</p></td>
</tr>
<tr class="even">
<td><p>subtype</p></td>
<td><ul>
<li>map_world: c(“sum”, “average”, [country names])
<ul>
<li>sum: the map value is calculated by ‘sum’ (default algorithm).</li>
<li>average: the map value is calculated by ‘average’.</li>
<li>move: <code>roam</code> method is ‘move’</li>
<li>scale: <code>roam</code> method is ‘scale’</li>
<li><code>/country names/</code>: A set of strings that are valid in Echarts. Refer to ‘valid country names’ below.</li>
</ul></li>
<li>map_world_multi: c(“sum”, “average”, “move”, “scale”, <code>/country names/</code>)</li>
<li>map_china: c(“sum”, “average”, “move”, “scale”, <code>/China province names/</code>)
<ul>
<li><code>/China province names/</code>: A set of strings that are valid in Echarts. Refer to ‘valid china province names’ below.</li>
</ul></li>
<li>map_china_multi: c(“sum”, “average”, “move”, “scale”, <code>/China province names/</code>)</li>
</ul></td>
</tr>
</tbody>
</table>
<ul>
<li><strong>Valid country names:</strong>
<ul>
<li>“Afghanistan”, “Angola”, “Albania”, “United Arab Emirates”, “Argentina”, “Armenia”, “French Southern and Antarctic Lands”, “Australia”, “Austria”, “Azerbaijan”, “Burundi”, “Belgium”, “Benin”, “Burkina Faso”, “Bangladesh”, “Bulgaria”, “The Bahamas”, “Bosnia and Herzegovina”, “Belarus”, “Belize”, “Bermuda”, “Bolivia”, “Brazil”, “Brunei”, “Bhutan”, “Botswana”, “Central African Republic”, “Canada”, “Switzerland”, “Chile”, “China”, “Ivory Coast”, “Cameroon”, “Democratic Republic of the Congo”, “Republic of the Congo”, “Colombia”, “Costa Rica”, “Cuba”, “Northern Cyprus”, “Cyprus”, “Czech Republic”, “Germany”, “Djibouti”, “Denmark”, “Dominican Republic”, “Algeria”, “Ecuador”, “Egypt”, “Eritrea”, “Spain”, “Estonia”, “Ethiopia”, “Finland”, “Fiji”, “Falkland Islands”, “France”, “Gabon”, “United Kingdom”, “Georgia”, “Ghana”, “Guinea”, “Gambia”, “Guinea Bissau”, “Equatorial Guinea”, “Greece”, “Greenland”, “Guatemala”, “French Guiana”, “Guyana”, “Honduras”, “Croatia”, “Haiti”, “Hungary”, “Indonesia”, “India”, “Ireland”, “Iran”, “Iraq”, “Iceland”, “Israel”, “Italy”, “Jamaica”, “Jordan”, “Japan”, “Kazakhstan”, “Kenya”, “Kyrgyzstan”, “Cambodia”, “South Korea”, “Kosovo”, “Kuwait”, “Laos”, “Lebanon”, “Liberia”, “Libya”, “Sri Lanka”, “Lesotho”, “Lithuania”, “Luxembourg”, “Latvia”, “Morocco”, “Moldova”, “Madagascar”, “Mexico”, “Macedonia”, “Mali”, “Myanmar”, “Montenegro”, “Mongolia”, “Mozambique”, “Mauritania”, “Malawi”, “Malaysia”, “Namibia”, “New Caledonia”, “Niger”, “Nigeria”, “Nicaragua”, “Netherlands”, “Norway”, “Nepal”, “New Zealand”, “Oman”, “Pakistan”, “Panama”, “Peru”, “Philippines”, “Papua New Guinea”, “Poland”, “Puerto Rico”, “North Korea”, “Portugal”, “Paraguay”, “Qatar”, “Romania”, “Russia”, “Rwanda”, “Western Sahara”, “Saudi Arabia”, “Sudan”, “South Sudan”, “Senegal”, “Solomon Islands”, “Sierra Leone”, “El Salvador”, “Somaliland”, “Somalia”, “Republic of Serbia”, “Suriname”, “Slovakia”, “Slovenia”, “Sweden”, “Swaziland”, “Syria”, “Chad”, “Togo”, “Thailand”, “Tajikistan”, “Turkmenistan”, “East Timor”, “Trinidad and Tobago”, “Tunisia”, “Turkey”, “United Republic of Tanzania”, “Uganda”, “Ukraine”, “Uruguay”, “United States of America”, “Uzbekistan”, “Venezuela”, “Vietnam”, “Vanuatu”, “West Bank”, “Yemen”, “South Africa”, “Zambia”, “Zimbabwe”</li>
</ul></li>
<li><strong>Valid China province names:</strong>
<ul>
<li>“新疆”, “西藏”, “内蒙古”, “青海”, “四川”, “黑龙江”, “甘肃”, “云南”, “广西”, “湖南”, “陕西”, “广东”, “吉林”, “河北”, “湖北”, “贵州”, “山东”, “江西”, “河南”, “辽宁”, “山西”, “安徽”, “福建”, “浙江”, “江苏”, “重庆”, “宁夏”, “海南”, “台湾”, “北京”, “天津”, “上海”, “香港”, “澳门”</li>
</ul></li>
</ul>
</div>
<div id="showcase" class="section level1">
<h1><span class="header-section-number">3</span> Showcase</h1>
<div id="base-map-mode" class="section level2">
<h2><span class="header-section-number">3.1</span> Base Map Mode</h2>
<p>If you leave all params NULL except for <code>type</code> and/or <code>subtype</code>, you will get a base map with no data shown.</p>
<div id="complete-base-map" class="section level3">
<h3><span class="header-section-number">3.1.1</span> Complete Base Map</h3>
<p>Set <code>type</code> ‘map_world’ or ‘map_china’. Leave all other params NULL.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">echartr</span>(<span class="ot">NULL</span>, <span class="dt">type=</span><span class="st">&#39;map_world&#39;</span>) %&gt;%<span class="st"> </span><span class="kw">setTitle</span>(<span class="st">&#39;World Map&#39;</span>)</code></pre></div>
<div id="htmlwidget-0d4a8d2feb15a29dcc2d" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-0d4a8d2feb15a29dcc2d">{"x":{"series":[{"type":"map","mapType":"world","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[]}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"legend":{"show":true,"data":[],"x":"left","y":"top","orient":"horizontal"},"title":{"text":"World Map","x":"center","y":"bottom","orient":"horizontal"}},"evals":[],"jsHooks":[]}</script>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">echartr</span>(<span class="ot">NULL</span>, <span class="dt">type=</span><span class="st">&#39;map_china&#39;</span>) %&gt;%<span class="st"> </span><span class="kw">setTitle</span>(<span class="st">&#39;China Map&#39;</span>)</code></pre></div>
<div id="htmlwidget-b5674f9b583fd12f376c" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-b5674f9b583fd12f376c">{"x":{"series":[{"type":"map","mapType":"china","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[]}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"legend":{"show":true,"data":[],"x":"left","y":"top","orient":"horizontal"},"title":{"text":"China Map","x":"center","y":"bottom","orient":"horizontal"}},"evals":[],"jsHooks":[]}</script>
</div>
<div id="partial-base-map" class="section level3">
<h3><span class="header-section-number">3.1.2</span> Partial Base map</h3>
<p>You can also display partial maps. Political zones of China can act as the independent mapType, so you can see its subordinate areas.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">echartr</span>(<span class="ot">NULL</span>, <span class="dt">type=</span><span class="st">&#39;map_world&#39;</span>, <span class="dt">subtype=</span><span class="st">&#39;United States of America&#39;</span>) %&gt;%<span class="st"> </span>
<span class="st">    </span><span class="kw">setTitle</span>(<span class="st">&#39;World Map|USA&#39;</span>)</code></pre></div>
<div id="htmlwidget-2702d5ea9b890e82088c" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-2702d5ea9b890e82088c">{"x":{"series":[{"type":"map","mapType":"world|United States of America","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[]}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"legend":{"show":true,"data":[],"x":"left","y":"top","orient":"horizontal"},"title":{"text":"World Map|USA","x":"center","y":"bottom","orient":"horizontal"}},"evals":[],"jsHooks":[]}</script>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">echartr</span>(<span class="ot">NULL</span>, <span class="dt">type=</span><span class="st">&#39;map_china&#39;</span>, <span class="dt">subtype=</span><span class="st">&#39;上海&#39;</span>) %&gt;%<span class="st"> </span>
<span class="st">    </span><span class="kw">setTitle</span>(<span class="st">&#39;China Map|Shanghai&#39;</span>)</code></pre></div>
<div id="htmlwidget-acd896999c81f6840338" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-acd896999c81f6840338">{"x":{"series":[{"type":"map","mapType":"上海","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[]}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"legend":{"show":true,"data":[],"x":"left","y":"top","orient":"horizontal"},"title":{"text":"China Map|Shanghai","x":"center","y":"bottom","orient":"horizontal"}},"evals":[],"jsHooks":[]}</script>
</div>
</div>
<div id="extensive-base-map-mode" class="section level2">
<h2><span class="header-section-number">3.2</span> Extensive Base Map Mode</h2>
<div id="multi-select-base-map" class="section level3">
<h3><span class="header-section-number">3.2.1</span> Multi-select Base Map</h3>
<p>Set <code>type</code> ‘map_world_multi’ or ‘map_china_multi’, you will get a base map for multiple selection. You can also apply subtypes to it.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">echartr</span>(<span class="ot">NULL</span>, <span class="dt">type=</span><span class="st">&#39;map_world_multi&#39;</span>) %&gt;%<span class="st"> </span><span class="kw">setTitle</span>(<span class="st">&#39;World Map&#39;</span>)</code></pre></div>
<div id="htmlwidget-bea9617076c3cef22de5" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-bea9617076c3cef22de5">{"x":{"series":[{"type":"map","mapType":"world","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[],"selectedMode":"multiple"}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"legend":{"show":true,"data":[],"x":"left","y":"top","orient":"horizontal"},"title":{"text":"World Map","x":"center","y":"bottom","orient":"horizontal"}},"evals":[],"jsHooks":[]}</script>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">echartr</span>(<span class="ot">NULL</span>, <span class="dt">type=</span><span class="st">&#39;map_china_multi&#39;</span>, <span class="dt">subtype=</span><span class="st">&#39;上海&#39;</span>) %&gt;%<span class="st"> </span>
<span class="st">    </span><span class="kw">setTitle</span>(<span class="st">&#39;China Map|Shanghai&#39;</span>)</code></pre></div>
<div id="htmlwidget-932b46d74859e18e205d" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-932b46d74859e18e205d">{"x":{"series":[{"type":"map","mapType":"上海","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[],"selectedMode":"multiple"}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"legend":{"show":true,"data":[],"x":"left","y":"top","orient":"horizontal"},"title":{"text":"China Map|Shanghai","x":"center","y":"bottom","orient":"horizontal"}},"evals":[],"jsHooks":[]}</script>
</div>
<div id="multiple-maps" class="section level3">
<h3><span class="header-section-number">3.2.2</span> Multiple Maps</h3>
<p>If you assign <code>facet</code> and <code>subtype</code> with valid geographic names, you will yield separated multiple maps. Note that <code>subtype</code> must be wrapped as list.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">data &lt;-<span class="st"> </span><span class="kw">data.frame</span>(<span class="dt">x=</span><span class="kw">c</span>(<span class="st">&#39;United States of America&#39;</span>, <span class="st">&#39;China&#39;</span>, <span class="st">&#39;Japan&#39;</span>))
<span class="kw">echartr</span>(data, x, <span class="dt">facet=</span>x, <span class="dt">type=</span><span class="st">&#39;map_world&#39;</span>, <span class="dt">subtype=</span><span class="kw">as.list</span>(data$x))</code></pre></div>
<div id="htmlwidget-9cbd027581cdefaa1a45" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-9cbd027581cdefaa1a45">{"x":{"series":[{"type":"map","mapType":"world|United States of America","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[],"mapLocation":{"x":"6.66666666666667%","y":"36.6666666666667%","width":"26%","height":"86%"}},{"type":"map","mapType":"world|China","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[],"mapLocation":{"x":"36.6666666666667%","y":"36.6666666666667%","width":"26%","height":"86%"}},{"type":"map","mapType":"world|Japan","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[],"mapLocation":{"x":"66.6666666666667%","y":"36.6666666666667%","width":"26%","height":"86%"}}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"legend":{"show":true,"data":[],"x":"left","y":"top","orient":"horizontal"}},"evals":[],"jsHooks":[]}</script>
</div>
</div>
<div id="data-map-mode" class="section level2">
<h2><span class="header-section-number">3.3</span> Data Map Mode</h2>
<p>You can attach data onto the base map to render it more informative.</p>
<div id="single-series" class="section level3">
<h3><span class="header-section-number">3.3.1</span> Single Series</h3>
<p>If no <code>series</code> is assigned, the map does not differentiate data series.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">worldgdp &lt;-<span class="st"> </span><span class="kw">data.frame</span>(
    <span class="dt">country=</span><span class="kw">c</span>(<span class="st">&#39;United States of America&#39;</span>, <span class="st">&#39;China&#39;</span>, <span class="st">&#39;Japan&#39;</span>, <span class="st">&#39;Germany&#39;</span>,
              <span class="st">&#39;United Kingdom&#39;</span>, <span class="st">&#39;France&#39;</span>, <span class="st">&#39;Brazil&#39;</span>, <span class="st">&#39;Italy&#39;</span>, <span class="st">&#39;India&#39;</span>,<span class="st">&#39;Russia&#39;</span>,
              <span class="st">&#39;Canada&#39;</span>, <span class="st">&#39;Australia&#39;</span>, <span class="st">&#39;South Korea&#39;</span>, <span class="st">&#39;Spain&#39;</span>, <span class="st">&#39;Mexico&#39;</span>, 
              <span class="st">&#39;Indonesia&#39;</span>, <span class="st">&#39;Netherlands&#39;</span>, <span class="st">&#39;Turkey&#39;</span>, <span class="st">&#39;Saudi Arabia&#39;</span>, 
              <span class="st">&#39;Switzerland&#39;</span>),
    <span class="dt">GDP=</span><span class="kw">c</span>(<span class="dv">17418925</span>, <span class="dv">10380380</span>, <span class="dv">4616335</span>, <span class="dv">3859547</span>, <span class="dv">2945146</span>, <span class="dv">2846889</span>, <span class="dv">2353025</span>, 
          <span class="dv">2147952</span>, <span class="dv">2049501</span>, <span class="dv">1857461</span>, <span class="dv">1788717</span>, <span class="dv">1444189</span>, <span class="dv">1416949</span>, <span class="dv">1406855</span>, <span class="dv">1282725</span>,
          <span class="dv">888648</span>, <span class="dv">866354</span>, <span class="dv">806108</span>, <span class="dv">752459</span>, <span class="dv">712050</span>))
<span class="kw">echartr</span>(worldgdp, country, GDP, <span class="dt">type=</span><span class="st">&quot;map_world&quot;</span>) %&gt;%
<span class="st">    </span><span class="kw">setTitle</span>(<span class="st">&quot;World GDP Top 20, 2014&quot;</span>)</code></pre></div>
<div id="htmlwidget-cbbf38a55709b5518a59" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-cbbf38a55709b5518a59">{"x":{"series":[{"type":"map","mapType":"world","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"United States of America","value":17418925,"selected":false},{"name":"China","value":10380380,"selected":false},{"name":"Japan","value":4616335,"selected":false},{"name":"Germany","value":3859547,"selected":false},{"name":"United Kingdom","value":2945146,"selected":false},{"name":"France","value":2846889,"selected":false},{"name":"Brazil","value":2353025,"selected":false},{"name":"Italy","value":2147952,"selected":false},{"name":"India","value":2049501,"selected":false},{"name":"Russia","value":1857461,"selected":false},{"name":"Canada","value":1788717,"selected":false},{"name":"Australia","value":1444189,"selected":false},{"name":"South Korea","value":1416949,"selected":false},{"name":"Spain","value":1406855,"selected":false},{"name":"Mexico","value":1282725,"selected":false},{"name":"Indonesia","value":888648,"selected":false},{"name":"Netherlands","value":866354,"selected":false},{"name":"Turkey","value":806108,"selected":false},{"name":"Saudi Arabia","value":752459,"selected":false},{"name":"Switzerland","value":712050,"selected":false}],"name":"GDP"}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"legend":{"show":true,"data":["GDP"],"x":"left","y":"top","orient":"horizontal"},"title":{"text":"World GDP Top 20, 2014","x":"center","y":"bottom","orient":"horizontal"}},"evals":[],"jsHooks":[]}</script>
<p>But point markers are not that informative. Let’s color the areas by mapping the data to dataRange. Plus, set it ‘move’ and ‘scale’.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">echartr</span>(worldgdp, country, GDP, <span class="dt">type=</span><span class="st">&quot;map_world&quot;</span>, <span class="dt">subtype=</span><span class="st">&quot;move + scale&quot;</span>) %&gt;%
<span class="st">    </span><span class="kw">setDataRange</span>(<span class="dt">splitNumber=</span><span class="dv">0</span>, <span class="dt">color=</span><span class="kw">getColFromPal</span>(<span class="st">&#39;rainbow&#39;</span>)) %&gt;%
<span class="st">    </span><span class="kw">setTitle</span>(<span class="st">&quot;World GDP Top 20, 2014&quot;</span>)</code></pre></div>
<div id="htmlwidget-5c2ab86ddb748af69ed9" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-5c2ab86ddb748af69ed9">{"x":{"series":[{"type":"map","mapType":"world","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"United States of America","value":17418925,"selected":false},{"name":"China","value":10380380,"selected":false},{"name":"Japan","value":4616335,"selected":false},{"name":"Germany","value":3859547,"selected":false},{"name":"United Kingdom","value":2945146,"selected":false},{"name":"France","value":2846889,"selected":false},{"name":"Brazil","value":2353025,"selected":false},{"name":"Italy","value":2147952,"selected":false},{"name":"India","value":2049501,"selected":false},{"name":"Russia","value":1857461,"selected":false},{"name":"Canada","value":1788717,"selected":false},{"name":"Australia","value":1444189,"selected":false},{"name":"South Korea","value":1416949,"selected":false},{"name":"Spain","value":1406855,"selected":false},{"name":"Mexico","value":1282725,"selected":false},{"name":"Indonesia","value":888648,"selected":false},{"name":"Netherlands","value":866354,"selected":false},{"name":"Turkey","value":806108,"selected":false},{"name":"Saudi Arabia","value":752459,"selected":false},{"name":"Switzerland","value":712050,"selected":false}],"roam":true,"name":"GDP"}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"legend":{"show":true,"data":["GDP"],"x":"left","y":"top","orient":"horizontal"},"dataRange":{"show":true,"calculable":true,"itemWidth":6,"selectedMode":true,"x":"left","y":"bottom","orient":"vertical","color":["#FF0000","#FFFF00","#00FF00","#00FFFF","#0000FF","#FF00FF"],"borderColor":"#ccc","borderWidth":0,"min":712050,"max":17418925},"title":{"text":"World GDP Top 20, 2014","x":"center","y":"bottom","orient":"horizontal"}},"evals":[],"jsHooks":[]}</script>
</div>
<div id="multiple-series" class="section level3">
<h3><span class="header-section-number">3.3.2</span> Multiple Series</h3>
<p>Let’s use <code>ChinaGDP</code> dataset with ‘Year’ as data series variable.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">str</span>(ChinaGDP)</code></pre></div>
<pre><code>## &#39;data.frame&#39;:    93 obs. of  3 variables:
##  $ Year: num  2012 2012 2012 2012 2012 ...
##  $ Prov: chr  &quot;广东&quot; &quot;江苏&quot; &quot;山东&quot; &quot;浙江&quot; ...
##  $ GDP : num  904046 856368 792289 549154 468900 ...</code></pre>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">totGDP &lt;-<span class="st"> </span>data.table::<span class="kw">dcast</span>(ChinaGDP, Prov~., sum, <span class="dt">value.var=</span><span class="st">&#39;GDP&#39;</span>)

ChinaGDP &lt;-<span class="st"> </span>ChinaGDP[<span class="kw">order</span>(ChinaGDP$Year),]
<span class="kw">echartr</span>(ChinaGDP, Prov, GDP, Year, <span class="dt">type=</span><span class="st">&quot;map_china&quot;</span>) %&gt;%
<span class="st">    </span><span class="kw">setDataRange</span>(<span class="dt">splitNumber=</span><span class="dv">0</span>, <span class="dt">valueRange=</span><span class="kw">range</span>(totGDP[, <span class="dv">2</span>]), 
                 <span class="dt">color=</span><span class="kw">c</span>(<span class="st">&#39;red&#39;</span>,<span class="st">&#39;orange&#39;</span>,<span class="st">&#39;yellow&#39;</span>,<span class="st">&#39;limegreen&#39;</span>,<span class="st">&#39;green&#39;</span>)) %&gt;%
<span class="st">    </span><span class="kw">setTitle</span>(<span class="st">&quot;China GDP by Provice, 2012-2014&quot;</span>)</code></pre></div>
<div id="htmlwidget-7445cb9ab5dc595e1501" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-7445cb9ab5dc595e1501">{"x":{"series":[{"type":"map","mapType":"china","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"广东","value":904046,"selected":false},{"name":"江苏","value":856368,"selected":false},{"name":"山东","value":792289,"selected":false},{"name":"浙江","value":549154,"selected":false},{"name":"河南","value":468900,"selected":false},{"name":"河北","value":420990,"selected":false},{"name":"辽宁","value":393607,"selected":false},{"name":"四川","value":378183,"selected":false},{"name":"湖北","value":352482,"selected":false},{"name":"湖南","value":350958,"selected":false},{"name":"上海","value":319710,"selected":false},{"name":"福建","value":312107,"selected":false},{"name":"北京","value":283238,"selected":false},{"name":"安徽","value":272666,"selected":false},{"name":"内蒙古","value":251574,"selected":false},{"name":"陕西","value":228969,"selected":false},{"name":"黑龙江","value":216896,"selected":false},{"name":"广西","value":206497,"selected":false},{"name":"江西","value":205131,"selected":false},{"name":"天津","value":204259,"selected":false},{"name":"山西","value":191886,"selected":false},{"name":"吉林","value":189136,"selected":false},{"name":"重庆","value":180746,"selected":false},{"name":"云南","value":163318,"selected":false},{"name":"新疆","value":118896,"selected":false},{"name":"贵州","value":108550,"selected":false},{"name":"甘肃","value":89508,"selected":false},{"name":"海南","value":45236,"selected":false},{"name":"宁夏","value":37090,"selected":false},{"name":"青海","value":29997,"selected":false},{"name":"西藏","value":11105,"selected":false}],"name":"2012"},{"type":"map","mapType":"china","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"广东","value":1003746,"selected":false},{"name":"江苏","value":955269,"selected":false},{"name":"山东","value":882974,"selected":false},{"name":"浙江","value":606609,"selected":false},{"name":"河南","value":519212,"selected":false},{"name":"河北","value":456976,"selected":false},{"name":"辽宁","value":437216,"selected":false},{"name":"四川","value":424026,"selected":false},{"name":"湖北","value":398316,"selected":false},{"name":"湖南","value":395622,"selected":false},{"name":"福建","value":351347,"selected":false},{"name":"上海","value":348804,"selected":false},{"name":"北京","value":314871,"selected":false},{"name":"安徽","value":307416,"selected":false},{"name":"内蒙古","value":271788,"selected":false},{"name":"陕西","value":259078,"selected":false},{"name":"黑龙江","value":232237,"selected":false},{"name":"广西","value":232158,"selected":false},{"name":"天津","value":232031,"selected":false},{"name":"江西","value":231520,"selected":false},{"name":"吉林","value":209608,"selected":false},{"name":"重庆","value":204364,"selected":false},{"name":"山西","value":203485,"selected":false},{"name":"云南","value":189255,"selected":false},{"name":"新疆","value":134991,"selected":false},{"name":"贵州","value":129284,"selected":false},{"name":"甘肃","value":101208,"selected":false},{"name":"海南","value":50805,"selected":false},{"name":"宁夏","value":41417,"selected":false},{"name":"青海","value":33925,"selected":false},{"name":"西藏","value":13041,"selected":false}],"name":"2013"},{"type":"map","mapType":"china","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"广东","value":1103605,"selected":false},{"name":"江苏","value":1059587,"selected":false},{"name":"山东","value":967419,"selected":false},{"name":"浙江","value":653668,"selected":false},{"name":"河南","value":568786,"selected":false},{"name":"河北","value":478953,"selected":false},{"name":"辽宁","value":466018,"selected":false},{"name":"四川","value":464555,"selected":false},{"name":"湖北","value":445514,"selected":false},{"name":"湖南","value":440328,"selected":false},{"name":"福建","value":391609,"selected":false},{"name":"上海","value":383554,"selected":false},{"name":"北京","value":347249,"selected":false},{"name":"安徽","value":339401,"selected":false},{"name":"内蒙古","value":289274,"selected":false},{"name":"陕西","value":287978,"selected":false},{"name":"天津","value":255950,"selected":false},{"name":"江西","value":255724,"selected":false},{"name":"广西","value":255144,"selected":false},{"name":"黑龙江","value":244829,"selected":false},{"name":"重庆","value":232230,"selected":false},{"name":"吉林","value":224715,"selected":false},{"name":"云南","value":208612,"selected":false},{"name":"山西","value":207714,"selected":false},{"name":"新疆","value":150812,"selected":false},{"name":"贵州","value":150599,"selected":false},{"name":"甘肃","value":111273,"selected":false},{"name":"海南","value":56989,"selected":false},{"name":"宁夏","value":44802,"selected":false},{"name":"青海","value":37460,"selected":false},{"name":"西藏","value":14990,"selected":false}],"name":"2014"}],"legend":{"show":true,"data":["2012","2013","2014"],"x":"left","y":"top","orient":"horizontal"},"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"dataRange":{"show":true,"calculable":true,"itemWidth":6,"selectedMode":true,"x":"left","y":"bottom","orient":"vertical","color":["red","orange","yellow","limegreen","green"],"borderColor":"#ccc","borderWidth":0,"min":39136,"max":3011397},"title":{"text":"China GDP by Provice, 2012-2014","x":"center","y":"bottom","orient":"horizontal"}},"evals":[],"jsHooks":[]}</script>
<p>This applies ‘sum’ as <code>mapvalueCalculation</code> method. Add ‘average’ to <code>subtype</code> to change the method to ‘avarge’.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">echartr</span>(ChinaGDP, Prov, GDP, Year, <span class="dt">type=</span><span class="st">&quot;map_china&quot;</span>, <span class="dt">subtype=</span><span class="st">&#39;average&#39;</span>) %&gt;%
<span class="st">    </span><span class="kw">setDataRange</span>(<span class="dt">splitNumber=</span><span class="dv">0</span>, 
                 <span class="dt">color=</span><span class="kw">c</span>(<span class="st">&#39;red&#39;</span>,<span class="st">&#39;orange&#39;</span>,<span class="st">&#39;yellow&#39;</span>,<span class="st">&#39;limegreen&#39;</span>,<span class="st">&#39;green&#39;</span>)) %&gt;%
<span class="st">    </span><span class="kw">setTitle</span>(<span class="st">&quot;China GDP by Provice, 2012-2014&quot;</span>)</code></pre></div>
<div id="htmlwidget-200a22998786c7da22fb" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-200a22998786c7da22fb">{"x":{"series":[{"type":"map","mapType":"china","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"广东","value":904046,"selected":false},{"name":"江苏","value":856368,"selected":false},{"name":"山东","value":792289,"selected":false},{"name":"浙江","value":549154,"selected":false},{"name":"河南","value":468900,"selected":false},{"name":"河北","value":420990,"selected":false},{"name":"辽宁","value":393607,"selected":false},{"name":"四川","value":378183,"selected":false},{"name":"湖北","value":352482,"selected":false},{"name":"湖南","value":350958,"selected":false},{"name":"上海","value":319710,"selected":false},{"name":"福建","value":312107,"selected":false},{"name":"北京","value":283238,"selected":false},{"name":"安徽","value":272666,"selected":false},{"name":"内蒙古","value":251574,"selected":false},{"name":"陕西","value":228969,"selected":false},{"name":"黑龙江","value":216896,"selected":false},{"name":"广西","value":206497,"selected":false},{"name":"江西","value":205131,"selected":false},{"name":"天津","value":204259,"selected":false},{"name":"山西","value":191886,"selected":false},{"name":"吉林","value":189136,"selected":false},{"name":"重庆","value":180746,"selected":false},{"name":"云南","value":163318,"selected":false},{"name":"新疆","value":118896,"selected":false},{"name":"贵州","value":108550,"selected":false},{"name":"甘肃","value":89508,"selected":false},{"name":"海南","value":45236,"selected":false},{"name":"宁夏","value":37090,"selected":false},{"name":"青海","value":29997,"selected":false},{"name":"西藏","value":11105,"selected":false}],"name":"2012","mapValueCalculation":"average"},{"type":"map","mapType":"china","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"广东","value":1003746,"selected":false},{"name":"江苏","value":955269,"selected":false},{"name":"山东","value":882974,"selected":false},{"name":"浙江","value":606609,"selected":false},{"name":"河南","value":519212,"selected":false},{"name":"河北","value":456976,"selected":false},{"name":"辽宁","value":437216,"selected":false},{"name":"四川","value":424026,"selected":false},{"name":"湖北","value":398316,"selected":false},{"name":"湖南","value":395622,"selected":false},{"name":"福建","value":351347,"selected":false},{"name":"上海","value":348804,"selected":false},{"name":"北京","value":314871,"selected":false},{"name":"安徽","value":307416,"selected":false},{"name":"内蒙古","value":271788,"selected":false},{"name":"陕西","value":259078,"selected":false},{"name":"黑龙江","value":232237,"selected":false},{"name":"广西","value":232158,"selected":false},{"name":"天津","value":232031,"selected":false},{"name":"江西","value":231520,"selected":false},{"name":"吉林","value":209608,"selected":false},{"name":"重庆","value":204364,"selected":false},{"name":"山西","value":203485,"selected":false},{"name":"云南","value":189255,"selected":false},{"name":"新疆","value":134991,"selected":false},{"name":"贵州","value":129284,"selected":false},{"name":"甘肃","value":101208,"selected":false},{"name":"海南","value":50805,"selected":false},{"name":"宁夏","value":41417,"selected":false},{"name":"青海","value":33925,"selected":false},{"name":"西藏","value":13041,"selected":false}],"name":"2013","mapValueCalculation":"average"},{"type":"map","mapType":"china","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"广东","value":1103605,"selected":false},{"name":"江苏","value":1059587,"selected":false},{"name":"山东","value":967419,"selected":false},{"name":"浙江","value":653668,"selected":false},{"name":"河南","value":568786,"selected":false},{"name":"河北","value":478953,"selected":false},{"name":"辽宁","value":466018,"selected":false},{"name":"四川","value":464555,"selected":false},{"name":"湖北","value":445514,"selected":false},{"name":"湖南","value":440328,"selected":false},{"name":"福建","value":391609,"selected":false},{"name":"上海","value":383554,"selected":false},{"name":"北京","value":347249,"selected":false},{"name":"安徽","value":339401,"selected":false},{"name":"内蒙古","value":289274,"selected":false},{"name":"陕西","value":287978,"selected":false},{"name":"天津","value":255950,"selected":false},{"name":"江西","value":255724,"selected":false},{"name":"广西","value":255144,"selected":false},{"name":"黑龙江","value":244829,"selected":false},{"name":"重庆","value":232230,"selected":false},{"name":"吉林","value":224715,"selected":false},{"name":"云南","value":208612,"selected":false},{"name":"山西","value":207714,"selected":false},{"name":"新疆","value":150812,"selected":false},{"name":"贵州","value":150599,"selected":false},{"name":"甘肃","value":111273,"selected":false},{"name":"海南","value":56989,"selected":false},{"name":"宁夏","value":44802,"selected":false},{"name":"青海","value":37460,"selected":false},{"name":"西藏","value":14990,"selected":false}],"name":"2014","mapValueCalculation":"average"}],"legend":{"show":true,"data":["2012","2013","2014"],"x":"left","y":"top","orient":"horizontal"},"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"dataRange":{"show":true,"calculable":true,"itemWidth":6,"selectedMode":true,"x":"left","y":"bottom","orient":"vertical","color":["red","orange","yellow","limegreen","green"],"borderColor":"#ccc","borderWidth":0,"min":11105,"max":1103605},"title":{"text":"China GDP by Provice, 2012-2014","x":"center","y":"bottom","orient":"horizontal"}},"evals":[],"jsHooks":[]}</script>
</div>
<div id="maps-with-timeline" class="section level3">
<h3><span class="header-section-number">3.3.3</span> Maps with Timeline</h3>
<p>Put ‘Year’ as <code>t</code>, we will get a map with timeline.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">echartr</span>(ChinaGDP, Prov, GDP, <span class="dt">t=</span>Year, <span class="dt">type=</span><span class="st">&quot;map_china&quot;</span>, <span class="dt">subtype=</span><span class="st">&#39;average&#39;</span>) %&gt;%
<span class="st">    </span><span class="kw">setDataRange</span>(<span class="dt">splitNumber=</span><span class="dv">0</span>, 
                 <span class="dt">color=</span><span class="kw">c</span>(<span class="st">&#39;red&#39;</span>,<span class="st">&#39;orange&#39;</span>,<span class="st">&#39;yellow&#39;</span>,<span class="st">&#39;limegreen&#39;</span>,<span class="st">&#39;green&#39;</span>)) %&gt;%
<span class="st">    </span><span class="kw">setTitle</span>(<span class="st">&quot;China GDP by Provice, 2012-2014&quot;</span>)</code></pre></div>
<div id="htmlwidget-8c34c5a292e386701ba7" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-8c34c5a292e386701ba7">{"x":{"timeline":{"type":"number","data":[2012,2013,2014],"x":90,"x2":80,"y2":50},"options":[{"series":[{"type":"map","mapType":"china","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"广东","value":904046,"selected":false},{"name":"江苏","value":856368,"selected":false},{"name":"山东","value":792289,"selected":false},{"name":"浙江","value":549154,"selected":false},{"name":"河南","value":468900,"selected":false},{"name":"河北","value":420990,"selected":false},{"name":"辽宁","value":393607,"selected":false},{"name":"四川","value":378183,"selected":false},{"name":"湖北","value":352482,"selected":false},{"name":"湖南","value":350958,"selected":false},{"name":"上海","value":319710,"selected":false},{"name":"福建","value":312107,"selected":false},{"name":"北京","value":283238,"selected":false},{"name":"安徽","value":272666,"selected":false},{"name":"内蒙古","value":251574,"selected":false},{"name":"陕西","value":228969,"selected":false},{"name":"黑龙江","value":216896,"selected":false},{"name":"广西","value":206497,"selected":false},{"name":"江西","value":205131,"selected":false},{"name":"天津","value":204259,"selected":false},{"name":"山西","value":191886,"selected":false},{"name":"吉林","value":189136,"selected":false},{"name":"重庆","value":180746,"selected":false},{"name":"云南","value":163318,"selected":false},{"name":"新疆","value":118896,"selected":false},{"name":"贵州","value":108550,"selected":false},{"name":"甘肃","value":89508,"selected":false},{"name":"海南","value":45236,"selected":false},{"name":"宁夏","value":37090,"selected":false},{"name":"青海","value":29997,"selected":false},{"name":"西藏","value":11105,"selected":false}],"name":"GDP","mapValueCalculation":"average"}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"legend":{"show":true,"data":["GDP"],"x":"left","y":"top","orient":"horizontal"},"dataRange":{"show":true,"calculable":true,"itemWidth":6,"selectedMode":true,"x":"left","y":"bottom","orient":"vertical","color":["red","orange","yellow","limegreen","green"],"borderColor":"#ccc","borderWidth":0,"min":11105,"max":1103605},"title":{"text":"China GDP by Provice, 2012-2014 (Year: 2012)","x":"center","y":"bottom","orient":"horizontal"}},{"series":[{"type":"map","mapType":"china","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"广东","value":1003746,"selected":false},{"name":"江苏","value":955269,"selected":false},{"name":"山东","value":882974,"selected":false},{"name":"浙江","value":606609,"selected":false},{"name":"河南","value":519212,"selected":false},{"name":"河北","value":456976,"selected":false},{"name":"辽宁","value":437216,"selected":false},{"name":"四川","value":424026,"selected":false},{"name":"湖北","value":398316,"selected":false},{"name":"湖南","value":395622,"selected":false},{"name":"福建","value":351347,"selected":false},{"name":"上海","value":348804,"selected":false},{"name":"北京","value":314871,"selected":false},{"name":"安徽","value":307416,"selected":false},{"name":"内蒙古","value":271788,"selected":false},{"name":"陕西","value":259078,"selected":false},{"name":"黑龙江","value":232237,"selected":false},{"name":"广西","value":232158,"selected":false},{"name":"天津","value":232031,"selected":false},{"name":"江西","value":231520,"selected":false},{"name":"吉林","value":209608,"selected":false},{"name":"重庆","value":204364,"selected":false},{"name":"山西","value":203485,"selected":false},{"name":"云南","value":189255,"selected":false},{"name":"新疆","value":134991,"selected":false},{"name":"贵州","value":129284,"selected":false},{"name":"甘肃","value":101208,"selected":false},{"name":"海南","value":50805,"selected":false},{"name":"宁夏","value":41417,"selected":false},{"name":"青海","value":33925,"selected":false},{"name":"西藏","value":13041,"selected":false}],"name":"GDP","mapValueCalculation":"average"}],"title":{"text":"China GDP by Provice, 2012-2014 (Year: 2013)","x":"center","y":"bottom","orient":"horizontal"}},{"series":[{"type":"map","mapType":"china","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"广东","value":1103605,"selected":false},{"name":"江苏","value":1059587,"selected":false},{"name":"山东","value":967419,"selected":false},{"name":"浙江","value":653668,"selected":false},{"name":"河南","value":568786,"selected":false},{"name":"河北","value":478953,"selected":false},{"name":"辽宁","value":466018,"selected":false},{"name":"四川","value":464555,"selected":false},{"name":"湖北","value":445514,"selected":false},{"name":"湖南","value":440328,"selected":false},{"name":"福建","value":391609,"selected":false},{"name":"上海","value":383554,"selected":false},{"name":"北京","value":347249,"selected":false},{"name":"安徽","value":339401,"selected":false},{"name":"内蒙古","value":289274,"selected":false},{"name":"陕西","value":287978,"selected":false},{"name":"天津","value":255950,"selected":false},{"name":"江西","value":255724,"selected":false},{"name":"广西","value":255144,"selected":false},{"name":"黑龙江","value":244829,"selected":false},{"name":"重庆","value":232230,"selected":false},{"name":"吉林","value":224715,"selected":false},{"name":"云南","value":208612,"selected":false},{"name":"山西","value":207714,"selected":false},{"name":"新疆","value":150812,"selected":false},{"name":"贵州","value":150599,"selected":false},{"name":"甘肃","value":111273,"selected":false},{"name":"海南","value":56989,"selected":false},{"name":"宁夏","value":44802,"selected":false},{"name":"青海","value":37460,"selected":false},{"name":"西藏","value":14990,"selected":false}],"name":"GDP","mapValueCalculation":"average"}],"title":{"text":"China GDP by Provice, 2012-2014 (Year: 2014)","x":"center","y":"bottom","orient":"horizontal"}}]},"evals":[],"jsHooks":[]}</script>
</div>
</div>
<div id="extensive-data-map-mode" class="section level2">
<h2><span class="header-section-number">3.4</span> Extensive Data Map Mode</h2>
<div id="multi-select-data-map" class="section level3">
<h3><span class="header-section-number">3.4.1</span> Multi-select Data Map</h3>
<p>Just set <code>type</code> ‘map_world_multi’ or ‘map_china_multi’. The rest are similar to above.</p>
</div>
<div id="multiple-maps-1" class="section level3">
<h3><span class="header-section-number">3.4.2</span> Multiple Maps</h3>
<p>Let’s tile the countries with top 10 GDP on the chart rather than showing them where they are.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">worldgdp &lt;-<span class="st"> </span>worldgdp[<span class="kw">order</span>(worldgdp$GDP, <span class="dt">decreasing=</span><span class="ot">TRUE</span>),]
worldgdp10 &lt;-<span class="st"> </span>worldgdp[<span class="dv">1</span>:<span class="dv">10</span>, ]

<span class="kw">echartr</span>(worldgdp10, country, GDP, <span class="dt">facet=</span>country, <span class="dt">type=</span><span class="st">&#39;map_world&#39;</span>, 
        <span class="dt">subtype=</span><span class="kw">as.list</span>(worldgdp10$country)) %&gt;%<span class="st"> </span>
<span class="st">    </span><span class="kw">setDataRange</span>(<span class="dt">color=</span><span class="kw">c</span>(
        <span class="st">&#39;red&#39;</span>, <span class="st">&#39;orange&#39;</span>, <span class="st">&#39;yellow&#39;</span>, <span class="st">&#39;limegreen&#39;</span>, <span class="st">&#39;green&#39;</span>), <span class="dt">pos=</span><span class="dv">4</span>) %&gt;%
<span class="st">    </span><span class="kw">setSymbols</span>(<span class="st">&#39;none&#39;</span>)</code></pre></div>
<div id="htmlwidget-4cb23275da2c4b4134ab" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-4cb23275da2c4b4134ab">{"x":{"series":[{"type":"map","mapType":"world|United States of America","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"United States of America","value":17418925,"selected":false}],"name":"GDP","mapLocation":{"x":"6.875%","y":"10.625%","width":"18.5%","height":"26%"}},{"type":"map","mapType":"world|China","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"China","value":10380380,"selected":false}],"name":"GDP","mapLocation":{"x":"29.375%","y":"10.625%","width":"18.5%","height":"26%"}},{"type":"map","mapType":"world|Japan","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"Japan","value":4616335,"selected":false}],"name":"GDP","mapLocation":{"x":"51.875%","y":"10.625%","width":"18.5%","height":"26%"}},{"type":"map","mapType":"world|Germany","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"Germany","value":3859547,"selected":false}],"name":"GDP","mapLocation":{"x":"74.375%","y":"10.625%","width":"18.5%","height":"26%"}},{"type":"map","mapType":"world|United Kingdom","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"United Kingdom","value":2945146,"selected":false}],"name":"GDP","mapLocation":{"x":"6.875%","y":"40.625%","width":"18.5%","height":"26%"}},{"type":"map","mapType":"world|France","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"France","value":2846889,"selected":false}],"name":"GDP","mapLocation":{"x":"29.375%","y":"40.625%","width":"18.5%","height":"26%"}},{"type":"map","mapType":"world|Brazil","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"Brazil","value":2353025,"selected":false}],"name":"GDP","mapLocation":{"x":"51.875%","y":"40.625%","width":"18.5%","height":"26%"}},{"type":"map","mapType":"world|Italy","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"Italy","value":2147952,"selected":false}],"name":"GDP","mapLocation":{"x":"74.375%","y":"40.625%","width":"18.5%","height":"26%"}},{"type":"map","mapType":"world|India","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"India","value":2049501,"selected":false}],"name":"GDP","mapLocation":{"x":"6.875%","y":"70.625%","width":"18.5%","height":"26%"}},{"type":"map","mapType":"world|Russia","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[{"name":"Russia","value":1857461,"selected":false}],"name":"GDP","mapLocation":{"x":"29.375%","y":"70.625%","width":"18.5%","height":"26%"}}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"legend":{"show":true,"data":["GDP"],"x":"left","y":"top","orient":"horizontal"},"dataRange":{"show":true,"calculable":false,"itemWidth":6,"selectedMode":true,"x":"right","y":"bottom","orient":"vertical","color":["red","orange","yellow","limegreen","green"],"borderColor":"#ccc","borderWidth":0,"min":1857461,"max":17418925},"symbolList":["none","none","none","none","none","none","none","none","none","none"]},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="futher-setup" class="section level1">
<h1><span class="header-section-number">4</span> Futher Setup</h1>
<p>Then you can configure the widgets, add markLines and/or markPoints, fortify the chart.</p>
<div id="addoveride-namemap" class="section level2">
<h2><span class="header-section-number">4.1</span> Add/Overide nameMap</h2>
<p>Maybe you want to show the China province names in English. You can use <code>addNameMap</code> or <code>overideNameMap</code> function.</p>
<p>There is a preinstalled dataset <strong>geoNameMap</strong> listing some Chinese and English geographic names. ‘LEVEL’ is a number ranging from 0 to 3: 0 reprensents country, 1 reprensents province, 2 reprensents city, and, 3 reprensents county. ‘FKEY’ is foreign key of the parent level. E.g., ‘China’ is in the record with ID 31, so we can get all the China provinces by <code>geoNameMap[geoNameMap$FKEY==31,]</code>.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">str</span>(geoNameMap)</code></pre></div>
<pre><code>## &#39;data.frame&#39;:    3735 obs. of  5 variables:
##  $ ID   : int  1 2 3 4 5 6 7 8 9 10 ...
##  $ EN   : chr  &quot;Afghanistan&quot; &quot;Angola&quot; &quot;Albania&quot; &quot;United Arab Emirates&quot; ...
##  $ CN   : chr  &quot;阿富汗&quot; &quot;安哥拉&quot; &quot;阿尔巴尼亚&quot; &quot;阿联酋&quot; ...
##  $ FKEY : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ LEVEL: int  0 0 0 0 0 0 0 0 0 0 ...</code></pre>
<p>So we prepare a two-column dictionary of the geographic names: Col 1 is the name in the source language, Col 2 is that in the target language. That’s the valid data structure <code>addNameMap</code> requires.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">dict &lt;-<span class="st"> </span>geoNameMap[geoNameMap$FKEY==<span class="dv">31</span>, <span class="kw">c</span>(<span class="st">&quot;CN&quot;</span>, <span class="st">&quot;EN&quot;</span>)]
<span class="kw">echartr</span>(<span class="ot">NULL</span>, <span class="dt">type=</span><span class="st">&quot;map_china_multi&quot;</span>) %&gt;%<span class="st"> </span><span class="kw">addNameMap</span>(dict, <span class="dt">mode=</span><span class="st">&#39;overide&#39;</span>)</code></pre></div>
<div id="htmlwidget-743c4a70b5b2e8ca753f" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-743c4a70b5b2e8ca753f">{"x":{"series":[{"type":"map","mapType":"china","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[],"selectedMode":"multiple","nameMap":{"北京":"Beijing","天津":"Tianjin","河北":"Hebei","山西":"Shanxi","内蒙古":"Inner Mongolia","辽宁":"Liaoning","吉林":"Jilin","黑龙江":"Heilongjiang","上海":"Shanghai","江苏":"Jiangsu","浙江":"Zhejiang","安徽":"Anhui","福建":"Fujian","江西":"Jiangxi","山东":"Shandong","河南":"Henan","湖北":"Hubei","湖南":"Hunan","广东":"Guangdong","广西":"Guangxi","海南":"Hainan","重庆":"Chongqing","四川":"Sichuan","贵州":"Guizhou","云南":"Yunnan","西藏":"Xizang","陕西":"Shaanxi","甘肃":"Gansu","青海":"Qinghai","宁夏":"Ningxia","新疆":"Xinjiang","台湾":"Taiwan","香港":"Hong Kong","澳门":"Macau"}}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"legend":{"show":true,"data":[],"x":"left","y":"top","orient":"horizontal"}},"evals":[],"jsHooks":[]}</script>
</div>
<div id="addoveride-markline" class="section level2">
<h2><span class="header-section-number">4.2</span> Add/Overide markLine</h2>
<div id="addmarkline" class="section level3">
<h3><span class="header-section-number">4.2.1</span> <code>addMarkLine</code></h3>
<p>Based on a base map, we can add markLines using <code>addMarkLine</code> (or <code>addML</code> for short) or <code>overideMarkLine</code>.</p>
<p>This instance makes use of another preinstalled dataset <strong>flight</strong>.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">str</span>(flight)</code></pre></div>
<pre><code>## List of 2
##  $ route:&#39;data.frame&#39;:   150 obs. of  2 variables:
##   ..$ From: chr [1:150] &quot;北京&quot; &quot;北京&quot; &quot;北京&quot; &quot;北京&quot; ...
##   ..$ To  : chr [1:150] &quot;包头&quot; &quot;北海&quot; &quot;广州&quot; &quot;郑州&quot; ...
##  $ coord:&#39;data.frame&#39;:   114 obs. of  3 variables:
##   ..$ Place: chr [1:114] &quot;上海&quot; &quot;东莞&quot; &quot;东营&quot; &quot;中山&quot; ...
##   ..$ Lng  : num [1:114] 121 114 119 113 111 ...
##   ..$ Lat  : num [1:114] 31.3 22.9 37.6 22.5 36.2 ...</code></pre>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">route &lt;-<span class="st"> </span>flight$route
<span class="kw">names</span>(route) &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="st">&#39;name1&#39;</span>, <span class="st">&#39;name2&#39;</span>)
coord &lt;-<span class="st"> </span>flight$coord
g &lt;-<span class="st"> </span><span class="kw">echartr</span>(<span class="ot">NULL</span>, <span class="dt">type=</span><span class="st">&#39;map_china&#39;</span>) %&gt;%<span class="st"> </span>
<span class="st">    </span><span class="kw">addML</span>(<span class="dt">series=</span><span class="st">&#39;北京&#39;</span>, <span class="dt">data=</span>route[route$name1==<span class="st">&#39;北京&#39;</span>,]) %&gt;%<span class="st"> </span>
<span class="st">    </span><span class="kw">addML</span>(<span class="dt">series=</span><span class="st">&#39;上海&#39;</span>, <span class="dt">data=</span>route[route$name1==<span class="st">&#39;上海&#39;</span>,]) %&gt;%<span class="st"> </span>
<span class="st">    </span><span class="kw">addML</span>(<span class="dt">series=</span><span class="st">&#39;广州&#39;</span>, <span class="dt">data=</span>route[route$name1==<span class="st">&#39;广州&#39;</span>,])
g</code></pre></div>
<div id="htmlwidget-5198f6e2b29321c50a77" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-5198f6e2b29321c50a77">{"x":{"series":[{"type":"map","mapType":"china","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[]},{"name":"北京","type":"map","data":[["-"]],"markLine":{"data":[[{"name":"北京"},{"name":"包头"}],[{"name":"北京"},{"name":"北海"}],[{"name":"北京"},{"name":"广州"}],[{"name":"北京"},{"name":"郑州"}],[{"name":"北京"},{"name":"长春"}],[{"name":"北京"},{"name":"长治"}],[{"name":"北京"},{"name":"重庆"}],[{"name":"北京"},{"name":"长沙"}],[{"name":"北京"},{"name":"成都"}],[{"name":"北京"},{"name":"常州"}],[{"name":"北京"},{"name":"丹东"}],[{"name":"北京"},{"name":"大连"}],[{"name":"北京"},{"name":"东营"}],[{"name":"北京"},{"name":"延安"}],[{"name":"北京"},{"name":"福州"}],[{"name":"北京"},{"name":"海口"}],[{"name":"北京"},{"name":"呼和浩特"}],[{"name":"北京"},{"name":"合肥"}],[{"name":"北京"},{"name":"杭州"}],[{"name":"北京"},{"name":"哈尔滨"}],[{"name":"北京"},{"name":"舟山"}],[{"name":"北京"},{"name":"银川"}],[{"name":"北京"},{"name":"衢州"}],[{"name":"北京"},{"name":"南昌"}],[{"name":"北京"},{"name":"昆明"}],[{"name":"北京"},{"name":"贵阳"}],[{"name":"北京"},{"name":"兰州"}],[{"name":"北京"},{"name":"拉萨"}],[{"name":"北京"},{"name":"连云港"}],[{"name":"北京"},{"name":"临沂"}],[{"name":"北京"},{"name":"柳州"}],[{"name":"北京"},{"name":"宁波"}],[{"name":"北京"},{"name":"南京"}],[{"name":"北京"},{"name":"南宁"}],[{"name":"北京"},{"name":"南通"}],[{"name":"北京"},{"name":"上海"}],[{"name":"北京"},{"name":"沈阳"}],[{"name":"北京"},{"name":"西安"}],[{"name":"北京"},{"name":"汕头"}],[{"name":"北京"},{"name":"深圳"}],[{"name":"北京"},{"name":"青岛"}],[{"name":"北京"},{"name":"济南"}],[{"name":"北京"},{"name":"太原"}],[{"name":"北京"},{"name":"乌鲁木齐"}],[{"name":"北京"},{"name":"潍坊"}],[{"name":"北京"},{"name":"威海"}],[{"name":"北京"},{"name":"温州"}],[{"name":"北京"},{"name":"武汉"}],[{"name":"北京"},{"name":"无锡"}],[{"name":"北京"},{"name":"厦门"}],[{"name":"北京"},{"name":"西宁"}],[{"name":"北京"},{"name":"徐州"}],[{"name":"北京"},{"name":"烟台"}],[{"name":"北京"},{"name":"盐城"}],[{"name":"北京"},{"name":"珠海"}]],"clickable":true,"symbol":["circle","arrow"],"smooth":false,"symbolSize":[2,4],"large":false,"effect":{"show":false},"smoothness":0.2,"precision":2,"bundling":{"enable":false,"maxTurningAngle":45}},"mapType":"china"},{"name":"上海","type":"map","data":[["-"]],"markLine":{"data":[[{"name":"上海"},{"name":"包头"}],[{"name":"上海"},{"name":"北海"}],[{"name":"上海"},{"name":"广州"}],[{"name":"上海"},{"name":"郑州"}],[{"name":"上海"},{"name":"长春"}],[{"name":"上海"},{"name":"重庆"}],[{"name":"上海"},{"name":"长沙"}],[{"name":"上海"},{"name":"成都"}],[{"name":"上海"},{"name":"丹东"}],[{"name":"上海"},{"name":"大连"}],[{"name":"上海"},{"name":"福州"}],[{"name":"上海"},{"name":"海口"}],[{"name":"上海"},{"name":"呼和浩特"}],[{"name":"上海"},{"name":"合肥"}],[{"name":"上海"},{"name":"哈尔滨"}],[{"name":"上海"},{"name":"舟山"}],[{"name":"上海"},{"name":"银川"}],[{"name":"上海"},{"name":"南昌"}],[{"name":"上海"},{"name":"昆明"}],[{"name":"上海"},{"name":"贵阳"}],[{"name":"上海"},{"name":"兰州"}],[{"name":"上海"},{"name":"拉萨"}],[{"name":"上海"},{"name":"连云港"}],[{"name":"上海"},{"name":"临沂"}],[{"name":"上海"},{"name":"柳州"}],[{"name":"上海"},{"name":"宁波"}],[{"name":"上海"},{"name":"南宁"}],[{"name":"上海"},{"name":"北京"}],[{"name":"上海"},{"name":"沈阳"}],[{"name":"上海"},{"name":"秦皇岛"}],[{"name":"上海"},{"name":"西安"}],[{"name":"上海"},{"name":"石家庄"}],[{"name":"上海"},{"name":"汕头"}],[{"name":"上海"},{"name":"深圳"}],[{"name":"上海"},{"name":"青岛"}],[{"name":"上海"},{"name":"济南"}],[{"name":"上海"},{"name":"天津"}],[{"name":"上海"},{"name":"太原"}],[{"name":"上海"},{"name":"乌鲁木齐"}],[{"name":"上海"},{"name":"潍坊"}],[{"name":"上海"},{"name":"威海"}],[{"name":"上海"},{"name":"温州"}],[{"name":"上海"},{"name":"武汉"}],[{"name":"上海"},{"name":"厦门"}],[{"name":"上海"},{"name":"西宁"}],[{"name":"上海"},{"name":"徐州"}],[{"name":"上海"},{"name":"烟台"}],[{"name":"上海"},{"name":"珠海"}]],"clickable":true,"symbol":["circle","arrow"],"smooth":false,"symbolSize":[2,4],"large":false,"effect":{"show":false},"smoothness":0.2,"precision":2,"bundling":{"enable":false,"maxTurningAngle":45}},"mapType":"china"},{"name":"广州","type":"map","data":[["-"]],"markLine":{"data":[[{"name":"广州"},{"name":"北海"}],[{"name":"广州"},{"name":"郑州"}],[{"name":"广州"},{"name":"长春"}],[{"name":"广州"},{"name":"重庆"}],[{"name":"广州"},{"name":"长沙"}],[{"name":"广州"},{"name":"成都"}],[{"name":"广州"},{"name":"常州"}],[{"name":"广州"},{"name":"大连"}],[{"name":"广州"},{"name":"福州"}],[{"name":"广州"},{"name":"海口"}],[{"name":"广州"},{"name":"呼和浩特"}],[{"name":"广州"},{"name":"合肥"}],[{"name":"广州"},{"name":"杭州"}],[{"name":"广州"},{"name":"哈尔滨"}],[{"name":"广州"},{"name":"舟山"}],[{"name":"广州"},{"name":"银川"}],[{"name":"广州"},{"name":"南昌"}],[{"name":"广州"},{"name":"昆明"}],[{"name":"广州"},{"name":"贵阳"}],[{"name":"广州"},{"name":"兰州"}],[{"name":"广州"},{"name":"拉萨"}],[{"name":"广州"},{"name":"连云港"}],[{"name":"广州"},{"name":"临沂"}],[{"name":"广州"},{"name":"柳州"}],[{"name":"广州"},{"name":"宁波"}],[{"name":"广州"},{"name":"南京"}],[{"name":"广州"},{"name":"南宁"}],[{"name":"广州"},{"name":"南通"}],[{"name":"广州"},{"name":"北京"}],[{"name":"广州"},{"name":"上海"}],[{"name":"广州"},{"name":"沈阳"}],[{"name":"广州"},{"name":"西安"}],[{"name":"广州"},{"name":"石家庄"}],[{"name":"广州"},{"name":"汕头"}],[{"name":"广州"},{"name":"青岛"}],[{"name":"广州"},{"name":"济南"}],[{"name":"广州"},{"name":"天津"}],[{"name":"广州"},{"name":"太原"}],[{"name":"广州"},{"name":"乌鲁木齐"}],[{"name":"广州"},{"name":"温州"}],[{"name":"广州"},{"name":"武汉"}],[{"name":"广州"},{"name":"无锡"}],[{"name":"广州"},{"name":"厦门"}],[{"name":"广州"},{"name":"西宁"}],[{"name":"广州"},{"name":"徐州"}],[{"name":"广州"},{"name":"烟台"}],[{"name":"广州"},{"name":"盐城"}]],"clickable":true,"symbol":["circle","arrow"],"smooth":false,"symbolSize":[2,4],"large":false,"effect":{"show":false},"smoothness":0.2,"precision":2,"bundling":{"enable":false,"maxTurningAngle":45}},"mapType":"china"}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"legend":{"show":true,"data":["北京","上海","广州"],"x":"left","y":"top","orient":"horizontal"}},"evals":[],"jsHooks":[]}</script>
<p>It is equivalent to</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g &lt;-<span class="st"> </span><span class="kw">echartr</span>(<span class="ot">NULL</span>, <span class="dt">type=</span><span class="st">&#39;map_china&#39;</span>) %&gt;%<span class="st"> </span>
<span class="st">    </span><span class="kw">addML</span>(<span class="dt">series=</span><span class="kw">c</span>(<span class="st">&#39;北京&#39;</span>, <span class="st">&#39;上海&#39;</span>, <span class="st">&#39;广州), data=route) </span></code></pre></div>
</div>
<div id="addgeocoord" class="section level3">
<h3><span class="header-section-number">4.2.2</span> <code>addGeoCoord</code></h3>
<p>But the markLines are not shown yet. You have to append the longitudes and latitudes of the places ever appear in the markLine dataset using <code>addGeoCoord</code>.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g %&gt;%<span class="st"> </span><span class="kw">addGeoCoord</span>(coord)</code></pre></div>
<div id="htmlwidget-53552b0c40a637f7977d" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-53552b0c40a637f7977d">{"x":{"series":[{"type":"map","mapType":"china","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[],"geoCoord":{"上海":[121.4648,31.2891],"东莞":[113.8953,22.901],"东营":[118.7073,37.5513],"中山":[113.4229,22.478],"临汾":[111.4783,36.1615],"临沂":[118.3118,35.2936],"丹东":[124.541,40.4242],"丽水":[119.5642,28.1854],"乌鲁木齐":[87.9236,43.5883],"佛山":[112.8955,23.1097],"保定":[115.0488,39.0948],"兰州":[103.5901,36.3043],"包头":[110.3467,41.4899],"北京":[116.4551,40.2539],"北海":[109.314,21.6211],"南京":[118.8062,31.9208],"南宁":[108.479,23.1152],"南昌":[116.0046,28.6633],"南通":[121.1023,32.1625],"厦门":[118.1689,24.6478],"台州":[121.1353,28.6688],"合肥":[117.29,32.0581],"呼和浩特":[111.4124,40.4901],"咸阳":[108.4131,34.8706],"哈尔滨":[127.9688,45.368],"唐山":[118.4766,39.6826],"嘉兴":[120.9155,30.6354],"大同":[113.7854,39.8035],"大连":[122.2229,39.4409],"天津":[117.4219,39.4189],"太原":[112.3352,37.9413],"威海":[121.9482,37.1393],"宁波":[121.5967,29.6466],"宝鸡":[107.1826,34.3433],"宿迁":[118.5535,33.7775],"常州":[119.4543,31.5582],"广州":[113.5107,23.2196],"廊坊":[116.521,39.0509],"延安":[109.1052,36.4252],"张家口":[115.1477,40.8527],"徐州":[117.5208,34.3268],"德州":[116.6858,37.2107],"惠州":[114.6204,23.1647],"成都":[103.9526,30.7617],"扬州":[119.4653,32.8162],"承德":[117.5757,41.4075],"拉萨":[91.1865,30.1465],"无锡":[120.3442,31.5527],"日照":[119.2786,35.5023],"昆明":[102.9199,25.4663],"杭州":[119.5313,29.8773],"枣庄":[117.323,34.8926],"柳州":[109.3799,24.9774],"株洲":[113.5327,27.0319],"武汉":[114.3896,30.6628],"汕头":[117.1692,23.3405],"江门":[112.6318,22.1484],"沈阳":[123.1238,42.1216],"沧州":[116.8286,38.2104],"河源":[114.917,23.9722],"泉州":[118.3228,25.1147],"泰安":[117.0264,36.0516],"泰州":[120.0586,32.5525],"济南":[117.1582,36.8701],"济宁":[116.8286,35.3375],"海口":[110.3893,19.8516],"淄博":[118.0371,36.6064],"淮安":[118.927,33.4039],"深圳":[114.5435,22.5439],"清远":[112.9175,24.3292],"温州":[120.498,27.8119],"渭南":[109.7864,35.0299],"湖州":[119.8608,30.7782],"湘潭":[112.5439,27.7075],"滨州":[117.8174,37.4963],"潍坊":[119.0918,36.524],"烟台":[120.7397,37.5128],"玉溪":[101.9312,23.8898],"珠海":[113.7305,22.1155],"盐城":[120.2234,33.5577],"盘锦":[121.9482,41.0449],"石家庄":[114.4995,38.1006],"福州":[119.4543,25.9222],"秦皇岛":[119.2126,40.0232],"绍兴":[120.564,29.7565],"聊城":[115.9167,36.4032],"肇庆":[112.1265,23.5822],"舟山":[122.2559,30.2234],"苏州":[120.6519,31.3989],"莱芜":[117.6526,36.2714],"菏泽":[115.6201,35.2057],"营口":[122.4316,40.4297],"葫芦岛":[120.1575,40.578],"衡水":[115.8838,37.7161],"衢州":[118.6853,28.8666],"西宁":[101.4038,36.8207],"西安":[109.1162,34.2004],"贵阳":[106.6992,26.7682],"连云港":[119.1248,34.552],"邢台":[114.8071,37.2821],"邯郸":[114.4775,36.535],"郑州":[113.4668,34.6234],"鄂尔多斯":[108.9734,39.2487],"重庆":[107.7539,30.1904],"金华":[120.0037,29.1028],"铜川":[109.0393,35.1947],"银川":[106.3586,38.1775],"镇江":[119.4763,31.9702],"长春":[125.8154,44.2584],"长沙":[113.0823,28.2568],"长治":[112.8625,36.4746],"阳泉":[113.4778,38.0951],"青岛":[120.4651,36.3373],"韶关":[113.7964,24.7028]}},{"name":"北京","type":"map","data":[["-"]],"markLine":{"data":[[{"name":"北京"},{"name":"包头"}],[{"name":"北京"},{"name":"北海"}],[{"name":"北京"},{"name":"广州"}],[{"name":"北京"},{"name":"郑州"}],[{"name":"北京"},{"name":"长春"}],[{"name":"北京"},{"name":"长治"}],[{"name":"北京"},{"name":"重庆"}],[{"name":"北京"},{"name":"长沙"}],[{"name":"北京"},{"name":"成都"}],[{"name":"北京"},{"name":"常州"}],[{"name":"北京"},{"name":"丹东"}],[{"name":"北京"},{"name":"大连"}],[{"name":"北京"},{"name":"东营"}],[{"name":"北京"},{"name":"延安"}],[{"name":"北京"},{"name":"福州"}],[{"name":"北京"},{"name":"海口"}],[{"name":"北京"},{"name":"呼和浩特"}],[{"name":"北京"},{"name":"合肥"}],[{"name":"北京"},{"name":"杭州"}],[{"name":"北京"},{"name":"哈尔滨"}],[{"name":"北京"},{"name":"舟山"}],[{"name":"北京"},{"name":"银川"}],[{"name":"北京"},{"name":"衢州"}],[{"name":"北京"},{"name":"南昌"}],[{"name":"北京"},{"name":"昆明"}],[{"name":"北京"},{"name":"贵阳"}],[{"name":"北京"},{"name":"兰州"}],[{"name":"北京"},{"name":"拉萨"}],[{"name":"北京"},{"name":"连云港"}],[{"name":"北京"},{"name":"临沂"}],[{"name":"北京"},{"name":"柳州"}],[{"name":"北京"},{"name":"宁波"}],[{"name":"北京"},{"name":"南京"}],[{"name":"北京"},{"name":"南宁"}],[{"name":"北京"},{"name":"南通"}],[{"name":"北京"},{"name":"上海"}],[{"name":"北京"},{"name":"沈阳"}],[{"name":"北京"},{"name":"西安"}],[{"name":"北京"},{"name":"汕头"}],[{"name":"北京"},{"name":"深圳"}],[{"name":"北京"},{"name":"青岛"}],[{"name":"北京"},{"name":"济南"}],[{"name":"北京"},{"name":"太原"}],[{"name":"北京"},{"name":"乌鲁木齐"}],[{"name":"北京"},{"name":"潍坊"}],[{"name":"北京"},{"name":"威海"}],[{"name":"北京"},{"name":"温州"}],[{"name":"北京"},{"name":"武汉"}],[{"name":"北京"},{"name":"无锡"}],[{"name":"北京"},{"name":"厦门"}],[{"name":"北京"},{"name":"西宁"}],[{"name":"北京"},{"name":"徐州"}],[{"name":"北京"},{"name":"烟台"}],[{"name":"北京"},{"name":"盐城"}],[{"name":"北京"},{"name":"珠海"}]],"clickable":true,"symbol":["circle","arrow"],"smooth":false,"symbolSize":[2,4],"large":false,"effect":{"show":false},"smoothness":0.2,"precision":2,"bundling":{"enable":false,"maxTurningAngle":45}},"mapType":"china"},{"name":"上海","type":"map","data":[["-"]],"markLine":{"data":[[{"name":"上海"},{"name":"包头"}],[{"name":"上海"},{"name":"北海"}],[{"name":"上海"},{"name":"广州"}],[{"name":"上海"},{"name":"郑州"}],[{"name":"上海"},{"name":"长春"}],[{"name":"上海"},{"name":"重庆"}],[{"name":"上海"},{"name":"长沙"}],[{"name":"上海"},{"name":"成都"}],[{"name":"上海"},{"name":"丹东"}],[{"name":"上海"},{"name":"大连"}],[{"name":"上海"},{"name":"福州"}],[{"name":"上海"},{"name":"海口"}],[{"name":"上海"},{"name":"呼和浩特"}],[{"name":"上海"},{"name":"合肥"}],[{"name":"上海"},{"name":"哈尔滨"}],[{"name":"上海"},{"name":"舟山"}],[{"name":"上海"},{"name":"银川"}],[{"name":"上海"},{"name":"南昌"}],[{"name":"上海"},{"name":"昆明"}],[{"name":"上海"},{"name":"贵阳"}],[{"name":"上海"},{"name":"兰州"}],[{"name":"上海"},{"name":"拉萨"}],[{"name":"上海"},{"name":"连云港"}],[{"name":"上海"},{"name":"临沂"}],[{"name":"上海"},{"name":"柳州"}],[{"name":"上海"},{"name":"宁波"}],[{"name":"上海"},{"name":"南宁"}],[{"name":"上海"},{"name":"北京"}],[{"name":"上海"},{"name":"沈阳"}],[{"name":"上海"},{"name":"秦皇岛"}],[{"name":"上海"},{"name":"西安"}],[{"name":"上海"},{"name":"石家庄"}],[{"name":"上海"},{"name":"汕头"}],[{"name":"上海"},{"name":"深圳"}],[{"name":"上海"},{"name":"青岛"}],[{"name":"上海"},{"name":"济南"}],[{"name":"上海"},{"name":"天津"}],[{"name":"上海"},{"name":"太原"}],[{"name":"上海"},{"name":"乌鲁木齐"}],[{"name":"上海"},{"name":"潍坊"}],[{"name":"上海"},{"name":"威海"}],[{"name":"上海"},{"name":"温州"}],[{"name":"上海"},{"name":"武汉"}],[{"name":"上海"},{"name":"厦门"}],[{"name":"上海"},{"name":"西宁"}],[{"name":"上海"},{"name":"徐州"}],[{"name":"上海"},{"name":"烟台"}],[{"name":"上海"},{"name":"珠海"}]],"clickable":true,"symbol":["circle","arrow"],"smooth":false,"symbolSize":[2,4],"large":false,"effect":{"show":false},"smoothness":0.2,"precision":2,"bundling":{"enable":false,"maxTurningAngle":45}},"mapType":"china"},{"name":"广州","type":"map","data":[["-"]],"markLine":{"data":[[{"name":"广州"},{"name":"北海"}],[{"name":"广州"},{"name":"郑州"}],[{"name":"广州"},{"name":"长春"}],[{"name":"广州"},{"name":"重庆"}],[{"name":"广州"},{"name":"长沙"}],[{"name":"广州"},{"name":"成都"}],[{"name":"广州"},{"name":"常州"}],[{"name":"广州"},{"name":"大连"}],[{"name":"广州"},{"name":"福州"}],[{"name":"广州"},{"name":"海口"}],[{"name":"广州"},{"name":"呼和浩特"}],[{"name":"广州"},{"name":"合肥"}],[{"name":"广州"},{"name":"杭州"}],[{"name":"广州"},{"name":"哈尔滨"}],[{"name":"广州"},{"name":"舟山"}],[{"name":"广州"},{"name":"银川"}],[{"name":"广州"},{"name":"南昌"}],[{"name":"广州"},{"name":"昆明"}],[{"name":"广州"},{"name":"贵阳"}],[{"name":"广州"},{"name":"兰州"}],[{"name":"广州"},{"name":"拉萨"}],[{"name":"广州"},{"name":"连云港"}],[{"name":"广州"},{"name":"临沂"}],[{"name":"广州"},{"name":"柳州"}],[{"name":"广州"},{"name":"宁波"}],[{"name":"广州"},{"name":"南京"}],[{"name":"广州"},{"name":"南宁"}],[{"name":"广州"},{"name":"南通"}],[{"name":"广州"},{"name":"北京"}],[{"name":"广州"},{"name":"上海"}],[{"name":"广州"},{"name":"沈阳"}],[{"name":"广州"},{"name":"西安"}],[{"name":"广州"},{"name":"石家庄"}],[{"name":"广州"},{"name":"汕头"}],[{"name":"广州"},{"name":"青岛"}],[{"name":"广州"},{"name":"济南"}],[{"name":"广州"},{"name":"天津"}],[{"name":"广州"},{"name":"太原"}],[{"name":"广州"},{"name":"乌鲁木齐"}],[{"name":"广州"},{"name":"温州"}],[{"name":"广州"},{"name":"武汉"}],[{"name":"广州"},{"name":"无锡"}],[{"name":"广州"},{"name":"厦门"}],[{"name":"广州"},{"name":"西宁"}],[{"name":"广州"},{"name":"徐州"}],[{"name":"广州"},{"name":"烟台"}],[{"name":"广州"},{"name":"盐城"}]],"clickable":true,"symbol":["circle","arrow"],"smooth":false,"symbolSize":[2,4],"large":false,"effect":{"show":false},"smoothness":0.2,"precision":2,"bundling":{"enable":false,"maxTurningAngle":45}},"mapType":"china"}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"legend":{"show":true,"data":["北京","上海","广州"],"x":"left","y":"top","orient":"horizontal"}},"evals":[],"jsHooks":[]}</script>
</div>
</div>
<div id="addoveride-markpoint" class="section level2">
<h2><span class="header-section-number">4.3</span> Add/Overide markPoint</h2>
<div id="addmarkpoint" class="section level3">
<h3><span class="header-section-number">4.3.1</span> <code>addMarkPoint</code></h3>
<p>Based on a base map, we can add markLines using <code>addMarkPoint</code> (or <code>addMP</code> for short) or <code>overideMarkPoint</code>.</p>
<p>This instance makes use of another preinstalled dataset <strong>chinapm25</strong>.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">str</span>(chinapm25)</code></pre></div>
<pre><code>## &#39;data.frame&#39;:    190 obs. of  4 variables:
##  $ name : chr  &quot;海门&quot; &quot;鄂尔多斯&quot; &quot;招远&quot; &quot;舟山&quot; ...
##  $ value: num  9 12 12 12 14 15 16 18 18 19 ...
##  $ lng  : num  121 110 120 122 124 ...
##  $ lat  : num  31.9 39.6 37.4 30 47.3 ...</code></pre>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">names</span>(chinapm25) &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="st">&#39;name&#39;</span>, <span class="st">&#39;value&#39;</span>, <span class="st">&#39;lng&#39;</span>, <span class="st">&#39;lat&#39;</span>)

g &lt;-<span class="st"> </span><span class="kw">echartr</span>(<span class="ot">NULL</span>, <span class="dt">type=</span><span class="st">&#39;map_china&#39;</span>) %&gt;%<span class="st"> </span>
<span class="st">    </span><span class="kw">addMP</span>(<span class="dt">data=</span>chinapm25[,<span class="kw">c</span>(<span class="st">&#39;name&#39;</span>, <span class="st">&#39;value&#39;</span>)], <span class="dt">symbolSize=</span><span class="dv">5</span>, <span class="dt">itemStyle=</span><span class="kw">list</span>(
        <span class="dt">normal=</span><span class="kw">list</span>(<span class="dt">borderColor=</span><span class="st">&#39;#87cefa&#39;</span>, <span class="dt">borderWidth=</span><span class="dv">1</span>,
                    <span class="dt">label=</span><span class="kw">list</span>(<span class="dt">show=</span><span class="ot">FALSE</span>)), 
        <span class="dt">emphasis=</span><span class="kw">list</span>(<span class="dt">borderColor=</span><span class="st">&#39;#1e90ff&#39;</span>, <span class="dt">borderWidth=</span><span class="dv">5</span>, 
                      <span class="dt">label=</span><span class="kw">list</span>(<span class="dt">show=</span><span class="ot">FALSE</span>))
    )) %&gt;%
<span class="st">    </span><span class="kw">addMP</span>(<span class="dt">series=</span><span class="st">&#39;Top 5&#39;</span>, 
          <span class="dt">data=</span><span class="kw">data.frame</span>(
              <span class="dt">name=</span><span class="kw">c</span>(<span class="st">&#39;廊坊&#39;</span>, <span class="st">&#39;合肥&#39;</span>, <span class="st">&#39;菏泽&#39;</span>, <span class="st">&#39;武汉&#39;</span>, <span class="st">&#39;大庆&#39;</span>),
              <span class="dt">value=</span><span class="kw">c</span>(<span class="dv">193</span>, <span class="dv">194</span>, <span class="dv">229</span>, <span class="dv">273</span>, <span class="dv">279</span>)), 
          <span class="dt">symbol=</span><span class="st">&#39;emptyCircle&#39;</span>,
          <span class="dt">symbolSize=</span><span class="kw">JS</span>(<span class="st">&#39;function (v) {return 10 + v/100;}&#39;</span>), 
          <span class="dt">effect=</span><span class="kw">list</span>(<span class="dt">show=</span><span class="ot">TRUE</span>)
    ) %&gt;%
<span class="st">    </span><span class="kw">setDataRange</span>(<span class="dt">splitNumber=</span><span class="dv">0</span>, <span class="dt">valueRange=</span><span class="kw">c</span>(<span class="dv">0</span>, <span class="dv">500</span>), <span class="dt">color=</span><span class="kw">c</span>(
        <span class="st">&#39;maroon&#39;</span>, <span class="st">&#39;purple&#39;</span>, <span class="st">&#39;red&#39;</span>, <span class="st">&#39;orange&#39;</span>, <span class="st">&#39;yellow&#39;</span>, <span class="st">&#39;lightgreen&#39;</span>))
g</code></pre></div>
<div id="htmlwidget-a432f396aa063f56eb3d" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-a432f396aa063f56eb3d">{"x":{"series":[{"type":"map","mapType":"china","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[],"markPoint":{"data":[{"name":"海门","value":9},{"name":"鄂尔多斯","value":12},{"name":"招远","value":12},{"name":"舟山","value":12},{"name":"齐齐哈尔","value":14},{"name":"盐城","value":15},{"name":"赤峰","value":16},{"name":"青岛","value":18},{"name":"乳山","value":18},{"name":"金昌","value":19},{"name":"泉州","value":21},{"name":"莱西","value":21},{"name":"日照","value":21},{"name":"胶南","value":22},{"name":"南通","value":23},{"name":"拉萨","value":24},{"name":"云浮","value":24},{"name":"梅州","value":25},{"name":"文登","value":25},{"name":"上海","value":25},{"name":"攀枝花","value":25},{"name":"威海","value":25},{"name":"承德","value":25},{"name":"厦门","value":26},{"name":"汕尾","value":26},{"name":"潮州","value":26},{"name":"丹东","value":27},{"name":"太仓","value":27},{"name":"曲靖","value":27},{"name":"烟台","value":28},{"name":"福州","value":29},{"name":"瓦房店","value":30},{"name":"即墨","value":30},{"name":"抚顺","value":31},{"name":"玉溪","value":31},{"name":"张家口","value":31},{"name":"阳泉","value":31},{"name":"莱州","value":32},{"name":"湖州","value":32},{"name":"汕头","value":32},{"name":"昆山","value":33},{"name":"宁波","value":33},{"name":"湛江","value":33},{"name":"揭阳","value":34},{"name":"荣成","value":34},{"name":"连云港","value":35},{"name":"葫芦岛","value":35},{"name":"常熟","value":36},{"name":"东莞","value":36},{"name":"河源","value":36},{"name":"淮安","value":36},{"name":"泰州","value":36},{"name":"南宁","value":37},{"name":"营口","value":37},{"name":"惠州","value":37},{"name":"江阴","value":37},{"name":"蓬莱","value":37},{"name":"韶关","value":38},{"name":"嘉峪关","value":38},{"name":"广州","value":38},{"name":"延安","value":38},{"name":"太原","value":39},{"name":"清远","value":39},{"name":"中山","value":39},{"name":"昆明","value":39},{"name":"寿光","value":40},{"name":"盘锦","value":40},{"name":"长治","value":41},{"name":"深圳","value":41},{"name":"珠海","value":42},{"name":"宿迁","value":43},{"name":"咸阳","value":43},{"name":"铜川","value":44},{"name":"平度","value":44},{"name":"佛山","value":44},{"name":"海口","value":44},{"name":"江门","value":45},{"name":"章丘","value":45},{"name":"肇庆","value":46},{"name":"大连","value":47},{"name":"临汾","value":47},{"name":"吴江","value":47},{"name":"石嘴山","value":49},{"name":"沈阳","value":50},{"name":"苏州","value":50},{"name":"茂名","value":50},{"name":"嘉兴","value":51},{"name":"长春","value":51},{"name":"胶州","value":52},{"name":"银川","value":52},{"name":"张家港","value":52},{"name":"三门峡","value":53},{"name":"锦州","value":54},{"name":"南昌","value":54},{"name":"柳州","value":54},{"name":"三亚","value":54},{"name":"自贡","value":56},{"name":"吉林","value":56},{"name":"阳江","value":57},{"name":"泸州","value":57},{"name":"西宁","value":57},{"name":"宜宾","value":58},{"name":"呼和浩特","value":58},{"name":"成都","value":58},{"name":"大同","value":58},{"name":"镇江","value":59},{"name":"桂林","value":59},{"name":"张家界","value":59},{"name":"宜兴","value":59},{"name":"北海","value":60},{"name":"西安","value":61},{"name":"金坛","value":62},{"name":"东营","value":62},{"name":"牡丹江","value":63},{"name":"遵义","value":63},{"name":"绍兴","value":63},{"name":"扬州","value":64},{"name":"常州","value":64},{"name":"潍坊","value":65},{"name":"重庆","value":66},{"name":"台州","value":67},{"name":"南京","value":67},{"name":"滨州","value":70},{"name":"贵阳","value":71},{"name":"无锡","value":71},{"name":"本溪","value":71},{"name":"克拉玛依","value":72},{"name":"渭南","value":72},{"name":"马鞍山","value":72},{"name":"宝鸡","value":72},{"name":"焦作","value":75},{"name":"句容","value":75},{"name":"北京","value":79},{"name":"徐州","value":79},{"name":"衡水","value":80},{"name":"包头","value":80},{"name":"绵阳","value":80},{"name":"乌鲁木齐","value":84},{"name":"枣庄","value":84},{"name":"杭州","value":84},{"name":"淄博","value":85},{"name":"鞍山","value":86},{"name":"溧阳","value":86},{"name":"库尔勒","value":86},{"name":"安阳","value":90},{"name":"开封","value":90},{"name":"济南","value":92},{"name":"德阳","value":93},{"name":"温州","value":95},{"name":"九江","value":96},{"name":"邯郸","value":98},{"name":"临安","value":99},{"name":"兰州","value":99},{"name":"沧州","value":100},{"name":"临沂","value":103},{"name":"南充","value":104},{"name":"天津","value":105},{"name":"富阳","value":106},{"name":"泰安","value":112},{"name":"诸暨","value":112},{"name":"郑州","value":113},{"name":"哈尔滨","value":114},{"name":"聊城","value":116},{"name":"芜湖","value":117},{"name":"唐山","value":119},{"name":"平顶山","value":119},{"name":"邢台","value":119},{"name":"德州","value":120},{"name":"济宁","value":120},{"name":"荆州","value":127},{"name":"宜昌","value":130},{"name":"义乌","value":132},{"name":"丽水","value":133},{"name":"洛阳","value":134},{"name":"秦皇岛","value":136},{"name":"株洲","value":143},{"name":"石家庄","value":147},{"name":"莱芜","value":148},{"name":"常德","value":152},{"name":"保定","value":153},{"name":"湘潭","value":154},{"name":"金华","value":157},{"name":"岳阳","value":169},{"name":"长沙","value":175},{"name":"衢州","value":177},{"name":"廊坊","value":193},{"name":"菏泽","value":194},{"name":"合肥","value":229},{"name":"武汉","value":273},{"name":"大庆","value":279}],"clickable":true,"symbol":"pin","symbolSize":5,"large":false,"effect":{"show":false},"itemStyle":{"normal":{"borderColor":"#87cefa","borderWidth":1,"label":{"show":false}},"emphasis":{"borderColor":"#1e90ff","borderWidth":5,"label":{"show":false}}}}},{"name":"Top 5","type":"map","data":[["-"]],"markPoint":{"data":[{"name":"廊坊","value":193},{"name":"合肥","value":194},{"name":"菏泽","value":229},{"name":"武汉","value":273},{"name":"大庆","value":279}],"clickable":true,"symbol":"emptyCircle","symbolSize":"function (v) {return 10 + v/100;}","large":false,"effect":{"show":true}},"mapType":"china"}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"legend":{"show":true,"data":["Top 5"],"x":"left","y":"top","orient":"horizontal"},"dataRange":{"show":true,"calculable":true,"itemWidth":6,"selectedMode":true,"x":"left","y":"bottom","orient":"vertical","color":["maroon","purple","red","orange","yellow","lightgreen"],"borderColor":"#ccc","borderWidth":0,"min":0,"max":500}},"evals":["series.1.markPoint.symbolSize"],"jsHooks":[]}</script>
</div>
<div id="addgeocoord-1" class="section level3">
<h3><span class="header-section-number">4.3.2</span> <code>addGeoCoord</code></h3>
<div id="pre-installed-geocoord-dataset" class="section level4">
<h4><span class="header-section-number">4.3.2.1</span> Pre-installed geoCoord dataset</h4>
<p>Although <code>recharts</code> can recognize most of the cities, there still might be points missing coordinates. Again, we need to define the geoCoord using <code>addGeoCoord</code>.</p>
<p><code>addGeoCoord</code> requires a data.frame with three columns in order: <code>name</code>, <code>longitude</code> and <code>latitude</code>. Pay attention to the order of <code>lng</code> and <code>lat</code>.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g %&gt;%<span class="st"> </span><span class="kw">addGeoCoord</span>(chinapm25[,<span class="kw">c</span>(<span class="st">&#39;name&#39;</span>, <span class="st">&#39;lng&#39;</span>, <span class="st">&#39;lat&#39;</span>)]) %&gt;%<span class="st"> </span>
<span class="st">    </span><span class="kw">setTitle</span>(<span class="st">&#39;PM2.5 in China Cities&#39;</span>, <span class="st">&#39;Fictious Data&#39;</span>)</code></pre></div>
<div id="htmlwidget-5efd186a2acdf22c8210" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-5efd186a2acdf22c8210">{"x":{"series":[{"type":"map","mapType":"china","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[],"markPoint":{"data":[{"name":"海门","value":9},{"name":"鄂尔多斯","value":12},{"name":"招远","value":12},{"name":"舟山","value":12},{"name":"齐齐哈尔","value":14},{"name":"盐城","value":15},{"name":"赤峰","value":16},{"name":"青岛","value":18},{"name":"乳山","value":18},{"name":"金昌","value":19},{"name":"泉州","value":21},{"name":"莱西","value":21},{"name":"日照","value":21},{"name":"胶南","value":22},{"name":"南通","value":23},{"name":"拉萨","value":24},{"name":"云浮","value":24},{"name":"梅州","value":25},{"name":"文登","value":25},{"name":"上海","value":25},{"name":"攀枝花","value":25},{"name":"威海","value":25},{"name":"承德","value":25},{"name":"厦门","value":26},{"name":"汕尾","value":26},{"name":"潮州","value":26},{"name":"丹东","value":27},{"name":"太仓","value":27},{"name":"曲靖","value":27},{"name":"烟台","value":28},{"name":"福州","value":29},{"name":"瓦房店","value":30},{"name":"即墨","value":30},{"name":"抚顺","value":31},{"name":"玉溪","value":31},{"name":"张家口","value":31},{"name":"阳泉","value":31},{"name":"莱州","value":32},{"name":"湖州","value":32},{"name":"汕头","value":32},{"name":"昆山","value":33},{"name":"宁波","value":33},{"name":"湛江","value":33},{"name":"揭阳","value":34},{"name":"荣成","value":34},{"name":"连云港","value":35},{"name":"葫芦岛","value":35},{"name":"常熟","value":36},{"name":"东莞","value":36},{"name":"河源","value":36},{"name":"淮安","value":36},{"name":"泰州","value":36},{"name":"南宁","value":37},{"name":"营口","value":37},{"name":"惠州","value":37},{"name":"江阴","value":37},{"name":"蓬莱","value":37},{"name":"韶关","value":38},{"name":"嘉峪关","value":38},{"name":"广州","value":38},{"name":"延安","value":38},{"name":"太原","value":39},{"name":"清远","value":39},{"name":"中山","value":39},{"name":"昆明","value":39},{"name":"寿光","value":40},{"name":"盘锦","value":40},{"name":"长治","value":41},{"name":"深圳","value":41},{"name":"珠海","value":42},{"name":"宿迁","value":43},{"name":"咸阳","value":43},{"name":"铜川","value":44},{"name":"平度","value":44},{"name":"佛山","value":44},{"name":"海口","value":44},{"name":"江门","value":45},{"name":"章丘","value":45},{"name":"肇庆","value":46},{"name":"大连","value":47},{"name":"临汾","value":47},{"name":"吴江","value":47},{"name":"石嘴山","value":49},{"name":"沈阳","value":50},{"name":"苏州","value":50},{"name":"茂名","value":50},{"name":"嘉兴","value":51},{"name":"长春","value":51},{"name":"胶州","value":52},{"name":"银川","value":52},{"name":"张家港","value":52},{"name":"三门峡","value":53},{"name":"锦州","value":54},{"name":"南昌","value":54},{"name":"柳州","value":54},{"name":"三亚","value":54},{"name":"自贡","value":56},{"name":"吉林","value":56},{"name":"阳江","value":57},{"name":"泸州","value":57},{"name":"西宁","value":57},{"name":"宜宾","value":58},{"name":"呼和浩特","value":58},{"name":"成都","value":58},{"name":"大同","value":58},{"name":"镇江","value":59},{"name":"桂林","value":59},{"name":"张家界","value":59},{"name":"宜兴","value":59},{"name":"北海","value":60},{"name":"西安","value":61},{"name":"金坛","value":62},{"name":"东营","value":62},{"name":"牡丹江","value":63},{"name":"遵义","value":63},{"name":"绍兴","value":63},{"name":"扬州","value":64},{"name":"常州","value":64},{"name":"潍坊","value":65},{"name":"重庆","value":66},{"name":"台州","value":67},{"name":"南京","value":67},{"name":"滨州","value":70},{"name":"贵阳","value":71},{"name":"无锡","value":71},{"name":"本溪","value":71},{"name":"克拉玛依","value":72},{"name":"渭南","value":72},{"name":"马鞍山","value":72},{"name":"宝鸡","value":72},{"name":"焦作","value":75},{"name":"句容","value":75},{"name":"北京","value":79},{"name":"徐州","value":79},{"name":"衡水","value":80},{"name":"包头","value":80},{"name":"绵阳","value":80},{"name":"乌鲁木齐","value":84},{"name":"枣庄","value":84},{"name":"杭州","value":84},{"name":"淄博","value":85},{"name":"鞍山","value":86},{"name":"溧阳","value":86},{"name":"库尔勒","value":86},{"name":"安阳","value":90},{"name":"开封","value":90},{"name":"济南","value":92},{"name":"德阳","value":93},{"name":"温州","value":95},{"name":"九江","value":96},{"name":"邯郸","value":98},{"name":"临安","value":99},{"name":"兰州","value":99},{"name":"沧州","value":100},{"name":"临沂","value":103},{"name":"南充","value":104},{"name":"天津","value":105},{"name":"富阳","value":106},{"name":"泰安","value":112},{"name":"诸暨","value":112},{"name":"郑州","value":113},{"name":"哈尔滨","value":114},{"name":"聊城","value":116},{"name":"芜湖","value":117},{"name":"唐山","value":119},{"name":"平顶山","value":119},{"name":"邢台","value":119},{"name":"德州","value":120},{"name":"济宁","value":120},{"name":"荆州","value":127},{"name":"宜昌","value":130},{"name":"义乌","value":132},{"name":"丽水","value":133},{"name":"洛阳","value":134},{"name":"秦皇岛","value":136},{"name":"株洲","value":143},{"name":"石家庄","value":147},{"name":"莱芜","value":148},{"name":"常德","value":152},{"name":"保定","value":153},{"name":"湘潭","value":154},{"name":"金华","value":157},{"name":"岳阳","value":169},{"name":"长沙","value":175},{"name":"衢州","value":177},{"name":"廊坊","value":193},{"name":"菏泽","value":194},{"name":"合肥","value":229},{"name":"武汉","value":273},{"name":"大庆","value":279}],"clickable":true,"symbol":"pin","symbolSize":5,"large":false,"effect":{"show":false},"itemStyle":{"normal":{"borderColor":"#87cefa","borderWidth":1,"label":{"show":false}},"emphasis":{"borderColor":"#1e90ff","borderWidth":5,"label":{"show":false}}}},"geoCoord":{"海门":[121.15,31.89],"鄂尔多斯":[109.78133,39.60827],"招远":[120.38,37.35],"舟山":[122.20722,29.9853],"齐齐哈尔":[123.97,47.33],"盐城":[120.13,33.38],"赤峰":[118.87,42.28],"青岛":[120.33,36.07],"乳山":[121.52,36.89],"金昌":[102.18804,38.52009],"泉州":[118.58,24.93],"莱西":[120.53,36.86],"日照":[119.46,35.42],"胶南":[119.97,35.88],"南通":[121.05,32.08],"拉萨":[91.11,29.97],"云浮":[112.02,22.93],"梅州":[116.1,24.55],"文登":[122.05,37.2],"上海":[121.48,31.22],"攀枝花":[101.71864,26.58235],"威海":[122.1,37.5],"承德":[117.93,40.97],"厦门":[118.1,24.46],"汕尾":[115.37528,22.78621],"潮州":[116.63,23.68],"丹东":[124.37,40.13],"太仓":[121.1,31.45],"曲靖":[103.79,25.51],"烟台":[121.39,37.52],"福州":[119.3,26.08],"瓦房店":[121.9796,39.62711],"即墨":[120.45,36.38],"抚顺":[123.97,41.97],"玉溪":[102.52,24.35],"张家口":[114.87,40.82],"阳泉":[113.57,37.85],"莱州":[119.94233,37.17702],"湖州":[120.1,30.86],"汕头":[116.69,23.39],"昆山":[120.95,31.39],"宁波":[121.56,29.86],"湛江":[110.35938,21.27071],"揭阳":[116.35,23.55],"荣成":[122.41,37.16],"连云港":[119.16,34.59],"葫芦岛":[120.83693,40.71105],"常熟":[120.74,31.64],"东莞":[113.75,23.04],"河源":[114.68,23.73],"淮安":[119.15,33.5],"泰州":[119.9,32.49],"南宁":[108.33,22.84],"营口":[122.18,40.65],"惠州":[114.4,23.09],"江阴":[120.26,31.91],"蓬莱":[120.75,37.8],"韶关":[113.62,24.84],"嘉峪关":[98.28915,39.77313],"广州":[113.23,23.16],"延安":[109.47,36.6],"太原":[112.53,37.87],"清远":[113.01,23.7],"中山":[113.38,22.52],"昆明":[102.73,25.04],"寿光":[118.73,36.86],"盘锦":[122.07071,41.12],"长治":[113.08,36.18],"深圳":[114.07,22.62],"珠海":[113.52,22.3],"宿迁":[118.3,33.96],"咸阳":[108.72,34.36],"铜川":[109.11,35.09],"平度":[119.97,36.77],"佛山":[113.11,23.05],"海口":[110.35,20.02],"江门":[113.06,22.61],"章丘":[117.53,36.72],"肇庆":[112.44,23.05],"大连":[121.62,38.92],"临汾":[111.5,36.08],"吴江":[120.63,31.16],"石嘴山":[106.39,39.04],"沈阳":[123.38,41.8],"苏州":[120.62,31.32],"茂名":[110.88,21.68],"嘉兴":[120.76,30.77],"长春":[125.35,43.88],"胶州":[120.03336,36.26462],"银川":[106.27,38.47],"张家港":[120.55582,31.87543],"三门峡":[111.19,34.76],"锦州":[121.15,41.13],"南昌":[115.89,28.68],"柳州":[109.4,24.33],"三亚":[109.51191,18.25285],"自贡":[104.77844,29.33903],"吉林":[126.57,43.87],"阳江":[111.95,21.85],"泸州":[105.39,28.91],"西宁":[101.74,36.56],"宜宾":[104.56,29.77],"呼和浩特":[111.65,40.82],"成都":[104.06,30.67],"大同":[113.3,40.12],"镇江":[119.44,32.2],"桂林":[110.28,25.29],"张家界":[110.47919,29.1171],"宜兴":[119.82,31.36],"北海":[109.12,21.49],"西安":[108.95,34.27],"金坛":[119.56,31.74],"东营":[118.49,37.46],"牡丹江":[129.58,44.6],"遵义":[106.9,27.7],"绍兴":[120.58,30.01],"扬州":[119.42,32.39],"常州":[119.95,31.79],"潍坊":[119.1,36.62],"重庆":[106.54,29.59],"台州":[121.42076,28.65639],"南京":[118.78,32.04],"滨州":[118.03,37.36],"贵阳":[106.71,26.57],"无锡":[120.29,31.59],"本溪":[123.73,41.3],"克拉玛依":[84.77,45.59],"渭南":[109.5,34.52],"马鞍山":[118.48,31.56],"宝鸡":[107.15,34.38],"焦作":[113.21,35.24],"句容":[119.16,31.95],"北京":[116.46,39.92],"徐州":[117.2,34.26],"衡水":[115.72,37.72],"包头":[110,40.58],"绵阳":[104.73,31.48],"乌鲁木齐":[87.68,43.77],"枣庄":[117.57,34.86],"杭州":[120.19,30.26],"淄博":[118.05,36.78],"鞍山":[122.85,41.12],"溧阳":[119.48,31.43],"库尔勒":[86.06,41.68],"安阳":[114.35,36.1],"开封":[114.35,34.79],"济南":[117,36.65],"德阳":[104.37,31.13],"温州":[120.65,28.01],"九江":[115.97,29.71],"邯郸":[114.47,36.6],"临安":[119.72,30.23],"兰州":[103.73,36.03],"沧州":[116.83,38.33],"临沂":[118.35,35.05],"南充":[106.1107,30.83779],"天津":[117.2,39.13],"富阳":[119.95,30.07],"泰安":[117.13,36.18],"诸暨":[120.23,29.71],"郑州":[113.65,34.76],"哈尔滨":[126.63,45.75],"聊城":[115.97,36.45],"芜湖":[118.38,31.33],"唐山":[118.02,39.63],"平顶山":[113.29,33.75],"邢台":[114.48,37.05],"德州":[116.29,37.45],"济宁":[116.59,35.38],"荆州":[112.23974,30.33516],"宜昌":[111.3,30.7],"义乌":[120.06,29.32],"丽水":[119.92,28.45],"洛阳":[112.44,34.7],"秦皇岛":[119.57,39.95],"株洲":[113.16,27.83],"石家庄":[114.48,38.03],"莱芜":[117.67,36.19],"常德":[111.69,29.05],"保定":[115.48,38.85],"湘潭":[112.91,27.87],"金华":[119.64,29.12],"岳阳":[113.09,29.37],"长沙":[113,28.21],"衢州":[118.88,28.97],"廊坊":[116.7,39.53],"菏泽":[115.48066,35.23375],"合肥":[117.27,31.86],"武汉":[114.31,30.52],"大庆":[125.03,46.58]}},{"name":"Top 5","type":"map","data":[["-"]],"markPoint":{"data":[{"name":"廊坊","value":193},{"name":"合肥","value":194},{"name":"菏泽","value":229},{"name":"武汉","value":273},{"name":"大庆","value":279}],"clickable":true,"symbol":"emptyCircle","symbolSize":"function (v) {return 10 + v/100;}","large":false,"effect":{"show":true}},"mapType":"china"}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"legend":{"show":true,"data":["Top 5"],"x":"left","y":"top","orient":"horizontal"},"dataRange":{"show":true,"calculable":true,"itemWidth":6,"selectedMode":true,"x":"left","y":"bottom","orient":"vertical","color":["maroon","purple","red","orange","yellow","lightgreen"],"borderColor":"#ccc","borderWidth":0,"min":0,"max":500},"title":{"text":"PM2.5 in China Cities","subtext":"Fictious Data","x":"center","y":"bottom","orient":"horizontal"}},"evals":["series.1.markPoint.symbolSize"],"jsHooks":[]}</script>
</div>
<div id="query-the-coordinates" class="section level4">
<h4><span class="header-section-number">4.3.2.2</span> Query the Coordinates</h4>
<p>What if I don’t know the coordinates of the places? You need <code>geocode</code> (forked from <a href="github.com/caijun/geoChina">geoChina</a>), which queries info from Google (so first you should be able to visit Google) or Baidu (in this way you need to provide Baidu api key).</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">geocode</span>(<span class="kw">c</span>(<span class="st">&#39;北京&#39;</span>, <span class="st">&#39;上海&#39;</span>), <span class="dt">api=</span><span class="st">&#39;google&#39;</span>)</code></pre></div>
<pre><code>##        lat      lng
## 1 39.90281 116.4012
## 2 31.23236 121.4692</code></pre>
<p>or <code>geocode(c('北京', '上海'), api='baidu', key='xxxxx')</code>.</p>
<p>These are coordinates under WGS-84 system. If you want to apply them in Echarts, you need to convert them to BD-09 system. You can use <code>convWGS2BD</code> function or use <code>geocode</code> with <code>ocs</code>=‘BD-09’ to do that.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">convWGS2BD</span>(<span class="kw">geocode</span>(<span class="kw">c</span>(<span class="st">&#39;北京&#39;</span>, <span class="st">&#39;上海&#39;</span>), <span class="dt">api=</span><span class="st">&#39;google&#39;</span>))</code></pre></div>
<pre><code>##        lat      lng
## 1 39.91053 116.4138
## 2 31.23636 121.4803</code></pre>
<p>or <code>geocode(c('北京', '上海'), api='google', ocs='BD-09')</code></p>
</div>
</div>
</div>
<div id="addmarkline-and-addmarkpoint" class="section level2">
<h2><span class="header-section-number">4.4</span> <code>addMarkLine</code> And <code>addMarkPoint</code></h2>
<p>In addition to the <code>addMarkLine</code> example, we <code>addMarkPOint</code> to yield the <a href="http://echarts.baidu.com/echarts2/doc/example/map11.html">Fictious Baidu Migration</a> example.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">route &lt;-<span class="st"> </span>flight$route
<span class="kw">names</span>(route) &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="st">&#39;name1&#39;</span>, <span class="st">&#39;name2&#39;</span>)
coord &lt;-<span class="st"> </span>flight$coord
target &lt;-<span class="st"> </span><span class="kw">data.frame</span>(
    <span class="dt">name1=</span><span class="kw">c</span>(<span class="kw">rep</span>(<span class="st">&#39;北京&#39;</span>, <span class="dv">10</span>), <span class="kw">rep</span>(<span class="st">&#39;上海&#39;</span>, <span class="dv">10</span>), <span class="kw">rep</span>(<span class="st">&#39;广州&#39;</span>, <span class="dv">10</span>)),
    <span class="dt">name2=</span><span class="kw">c</span>(
        <span class="st">&quot;上海&quot;</span>,<span class="st">&quot;广州&quot;</span>,<span class="st">&quot;大连&quot;</span>,<span class="st">&quot;南宁&quot;</span>,<span class="st">&quot;南昌&quot;</span>,<span class="st">&quot;拉萨&quot;</span>,<span class="st">&quot;长春&quot;</span>,<span class="st">&quot;包头&quot;</span>,<span class="st">&quot;重庆&quot;</span>,<span class="st">&quot;常州&quot;</span>,
        <span class="st">&quot;包头&quot;</span>,<span class="st">&quot;昆明&quot;</span>,<span class="st">&quot;广州&quot;</span>,<span class="st">&quot;郑州&quot;</span>,<span class="st">&quot;长春&quot;</span>,<span class="st">&quot;重庆&quot;</span>,<span class="st">&quot;长沙&quot;</span>,<span class="st">&quot;北京&quot;</span>,<span class="st">&quot;丹东&quot;</span>,<span class="st">&quot;大连&quot;</span>,
        <span class="st">&quot;福州&quot;</span>,<span class="st">&quot;太原&quot;</span>,<span class="st">&quot;长春&quot;</span>,<span class="st">&quot;重庆&quot;</span>,<span class="st">&quot;西安&quot;</span>,<span class="st">&quot;成都&quot;</span>,<span class="st">&quot;常州&quot;</span>,<span class="st">&quot;北京&quot;</span>,<span class="st">&quot;北海&quot;</span>,<span class="st">&quot;海口&quot;</span>),
    <span class="dt">value=</span><span class="kw">c</span>(<span class="dv">95</span>,<span class="dv">90</span>,<span class="dv">80</span>,<span class="dv">70</span>,<span class="dv">60</span>,<span class="dv">50</span>,<span class="dv">40</span>,<span class="dv">30</span>,<span class="dv">20</span>,<span class="dv">10</span>,<span class="dv">95</span>,<span class="dv">90</span>,<span class="dv">80</span>,<span class="dv">70</span>,<span class="dv">60</span>,<span class="dv">50</span>,<span class="dv">40</span>,<span class="dv">30</span>,<span class="dv">20</span>,<span class="dv">10</span>,<span class="dv">95</span>,<span class="dv">90</span>,
            <span class="dv">80</span>,<span class="dv">70</span>,<span class="dv">60</span>,<span class="dv">50</span>,<span class="dv">40</span>,<span class="dv">30</span>,<span class="dv">20</span>,<span class="dv">10</span>))
<span class="co"># series column mapping series of addML/addMP</span>
target$series &lt;-<span class="st"> </span><span class="kw">paste0</span>(target$name1, <span class="st">&#39;Top10&#39;</span>)

## apply addGeoCoord, and add markLines without values
g &lt;-<span class="st"> </span><span class="kw">echartr</span>(<span class="ot">NULL</span>, <span class="dt">type=</span><span class="st">&#39;map_china&#39;</span>) %&gt;%<span class="st"> </span><span class="kw">addGeoCoord</span>(coord) %&gt;%
<span class="st">    </span><span class="kw">addML</span>(<span class="dt">series=</span><span class="dv">1</span>, <span class="dt">data=</span>route, <span class="dt">symbol=</span><span class="kw">c</span>(<span class="st">&#39;none&#39;</span>, <span class="st">&#39;circle&#39;</span>), <span class="dt">symbolSize=</span><span class="dv">1</span>, 
          <span class="dt">smooth=</span><span class="ot">TRUE</span>, <span class="dt">itemStyle=</span><span class="kw">list</span>(<span class="dt">normal=</span><span class="kw">itemStyle</span>(
              <span class="dt">color=</span><span class="st">&#39;#fff&#39;</span>, <span class="dt">borderWidth=</span><span class="dv">1</span>, <span class="dt">borderColor=</span><span class="st">&#39;rgba(30,144,255,0.5)&#39;</span>)))

## modify itemStyle of the base map to align the areaStyle with bgColor and 
## disable `hoverable`
g &lt;-<span class="st"> </span>g %&gt;%<span class="st"> </span><span class="kw">setSeries</span>(<span class="dt">hoverable=</span><span class="ot">FALSE</span>, <span class="dt">itemStyle=</span><span class="kw">list</span>(
    <span class="dt">normal=</span><span class="kw">itemStyle</span>(
        <span class="dt">borderColor=</span><span class="st">&#39;rgba(100,149,237,1)&#39;</span>, <span class="dt">borderWidth=</span><span class="fl">0.5</span>, 
        <span class="dt">areaStyle=</span><span class="kw">areaStyle</span>(<span class="dt">color=</span><span class="st">&#39;#1b1b1b&#39;</span>))
))

g</code></pre></div>
<div id="htmlwidget-7e3087d5b8a86041ad0d" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-7e3087d5b8a86041ad0d">{"x":{"series":[{"type":"map","mapType":"china","itemStyle":{"normal":{"label":{"show":false},"borderColor":"rgba(100,149,237,1)","borderWidth":0.5,"areaStyle":{"color":"#1b1b1b"}},"emphasis":{"label":{"show":true}}},"data":[],"geoCoord":{"上海":[121.4648,31.2891],"东莞":[113.8953,22.901],"东营":[118.7073,37.5513],"中山":[113.4229,22.478],"临汾":[111.4783,36.1615],"临沂":[118.3118,35.2936],"丹东":[124.541,40.4242],"丽水":[119.5642,28.1854],"乌鲁木齐":[87.9236,43.5883],"佛山":[112.8955,23.1097],"保定":[115.0488,39.0948],"兰州":[103.5901,36.3043],"包头":[110.3467,41.4899],"北京":[116.4551,40.2539],"北海":[109.314,21.6211],"南京":[118.8062,31.9208],"南宁":[108.479,23.1152],"南昌":[116.0046,28.6633],"南通":[121.1023,32.1625],"厦门":[118.1689,24.6478],"台州":[121.1353,28.6688],"合肥":[117.29,32.0581],"呼和浩特":[111.4124,40.4901],"咸阳":[108.4131,34.8706],"哈尔滨":[127.9688,45.368],"唐山":[118.4766,39.6826],"嘉兴":[120.9155,30.6354],"大同":[113.7854,39.8035],"大连":[122.2229,39.4409],"天津":[117.4219,39.4189],"太原":[112.3352,37.9413],"威海":[121.9482,37.1393],"宁波":[121.5967,29.6466],"宝鸡":[107.1826,34.3433],"宿迁":[118.5535,33.7775],"常州":[119.4543,31.5582],"广州":[113.5107,23.2196],"廊坊":[116.521,39.0509],"延安":[109.1052,36.4252],"张家口":[115.1477,40.8527],"徐州":[117.5208,34.3268],"德州":[116.6858,37.2107],"惠州":[114.6204,23.1647],"成都":[103.9526,30.7617],"扬州":[119.4653,32.8162],"承德":[117.5757,41.4075],"拉萨":[91.1865,30.1465],"无锡":[120.3442,31.5527],"日照":[119.2786,35.5023],"昆明":[102.9199,25.4663],"杭州":[119.5313,29.8773],"枣庄":[117.323,34.8926],"柳州":[109.3799,24.9774],"株洲":[113.5327,27.0319],"武汉":[114.3896,30.6628],"汕头":[117.1692,23.3405],"江门":[112.6318,22.1484],"沈阳":[123.1238,42.1216],"沧州":[116.8286,38.2104],"河源":[114.917,23.9722],"泉州":[118.3228,25.1147],"泰安":[117.0264,36.0516],"泰州":[120.0586,32.5525],"济南":[117.1582,36.8701],"济宁":[116.8286,35.3375],"海口":[110.3893,19.8516],"淄博":[118.0371,36.6064],"淮安":[118.927,33.4039],"深圳":[114.5435,22.5439],"清远":[112.9175,24.3292],"温州":[120.498,27.8119],"渭南":[109.7864,35.0299],"湖州":[119.8608,30.7782],"湘潭":[112.5439,27.7075],"滨州":[117.8174,37.4963],"潍坊":[119.0918,36.524],"烟台":[120.7397,37.5128],"玉溪":[101.9312,23.8898],"珠海":[113.7305,22.1155],"盐城":[120.2234,33.5577],"盘锦":[121.9482,41.0449],"石家庄":[114.4995,38.1006],"福州":[119.4543,25.9222],"秦皇岛":[119.2126,40.0232],"绍兴":[120.564,29.7565],"聊城":[115.9167,36.4032],"肇庆":[112.1265,23.5822],"舟山":[122.2559,30.2234],"苏州":[120.6519,31.3989],"莱芜":[117.6526,36.2714],"菏泽":[115.6201,35.2057],"营口":[122.4316,40.4297],"葫芦岛":[120.1575,40.578],"衡水":[115.8838,37.7161],"衢州":[118.6853,28.8666],"西宁":[101.4038,36.8207],"西安":[109.1162,34.2004],"贵阳":[106.6992,26.7682],"连云港":[119.1248,34.552],"邢台":[114.8071,37.2821],"邯郸":[114.4775,36.535],"郑州":[113.4668,34.6234],"鄂尔多斯":[108.9734,39.2487],"重庆":[107.7539,30.1904],"金华":[120.0037,29.1028],"铜川":[109.0393,35.1947],"银川":[106.3586,38.1775],"镇江":[119.4763,31.9702],"长春":[125.8154,44.2584],"长沙":[113.0823,28.2568],"长治":[112.8625,36.4746],"阳泉":[113.4778,38.0951],"青岛":[120.4651,36.3373],"韶关":[113.7964,24.7028]},"markLine":{"data":[[{"name":"北京"},{"name":"包头"}],[{"name":"北京"},{"name":"北海"}],[{"name":"北京"},{"name":"广州"}],[{"name":"北京"},{"name":"郑州"}],[{"name":"北京"},{"name":"长春"}],[{"name":"北京"},{"name":"长治"}],[{"name":"北京"},{"name":"重庆"}],[{"name":"北京"},{"name":"长沙"}],[{"name":"北京"},{"name":"成都"}],[{"name":"北京"},{"name":"常州"}],[{"name":"北京"},{"name":"丹东"}],[{"name":"北京"},{"name":"大连"}],[{"name":"北京"},{"name":"东营"}],[{"name":"北京"},{"name":"延安"}],[{"name":"北京"},{"name":"福州"}],[{"name":"北京"},{"name":"海口"}],[{"name":"北京"},{"name":"呼和浩特"}],[{"name":"北京"},{"name":"合肥"}],[{"name":"北京"},{"name":"杭州"}],[{"name":"北京"},{"name":"哈尔滨"}],[{"name":"北京"},{"name":"舟山"}],[{"name":"北京"},{"name":"银川"}],[{"name":"北京"},{"name":"衢州"}],[{"name":"北京"},{"name":"南昌"}],[{"name":"北京"},{"name":"昆明"}],[{"name":"北京"},{"name":"贵阳"}],[{"name":"北京"},{"name":"兰州"}],[{"name":"北京"},{"name":"拉萨"}],[{"name":"北京"},{"name":"连云港"}],[{"name":"北京"},{"name":"临沂"}],[{"name":"北京"},{"name":"柳州"}],[{"name":"北京"},{"name":"宁波"}],[{"name":"北京"},{"name":"南京"}],[{"name":"北京"},{"name":"南宁"}],[{"name":"北京"},{"name":"南通"}],[{"name":"北京"},{"name":"上海"}],[{"name":"北京"},{"name":"沈阳"}],[{"name":"北京"},{"name":"西安"}],[{"name":"北京"},{"name":"汕头"}],[{"name":"北京"},{"name":"深圳"}],[{"name":"北京"},{"name":"青岛"}],[{"name":"北京"},{"name":"济南"}],[{"name":"北京"},{"name":"太原"}],[{"name":"北京"},{"name":"乌鲁木齐"}],[{"name":"北京"},{"name":"潍坊"}],[{"name":"北京"},{"name":"威海"}],[{"name":"北京"},{"name":"温州"}],[{"name":"北京"},{"name":"武汉"}],[{"name":"北京"},{"name":"无锡"}],[{"name":"北京"},{"name":"厦门"}],[{"name":"北京"},{"name":"西宁"}],[{"name":"北京"},{"name":"徐州"}],[{"name":"北京"},{"name":"烟台"}],[{"name":"北京"},{"name":"盐城"}],[{"name":"北京"},{"name":"珠海"}],[{"name":"上海"},{"name":"包头"}],[{"name":"上海"},{"name":"北海"}],[{"name":"上海"},{"name":"广州"}],[{"name":"上海"},{"name":"郑州"}],[{"name":"上海"},{"name":"长春"}],[{"name":"上海"},{"name":"重庆"}],[{"name":"上海"},{"name":"长沙"}],[{"name":"上海"},{"name":"成都"}],[{"name":"上海"},{"name":"丹东"}],[{"name":"上海"},{"name":"大连"}],[{"name":"上海"},{"name":"福州"}],[{"name":"上海"},{"name":"海口"}],[{"name":"上海"},{"name":"呼和浩特"}],[{"name":"上海"},{"name":"合肥"}],[{"name":"上海"},{"name":"哈尔滨"}],[{"name":"上海"},{"name":"舟山"}],[{"name":"上海"},{"name":"银川"}],[{"name":"上海"},{"name":"南昌"}],[{"name":"上海"},{"name":"昆明"}],[{"name":"上海"},{"name":"贵阳"}],[{"name":"上海"},{"name":"兰州"}],[{"name":"上海"},{"name":"拉萨"}],[{"name":"上海"},{"name":"连云港"}],[{"name":"上海"},{"name":"临沂"}],[{"name":"上海"},{"name":"柳州"}],[{"name":"上海"},{"name":"宁波"}],[{"name":"上海"},{"name":"南宁"}],[{"name":"上海"},{"name":"北京"}],[{"name":"上海"},{"name":"沈阳"}],[{"name":"上海"},{"name":"秦皇岛"}],[{"name":"上海"},{"name":"西安"}],[{"name":"上海"},{"name":"石家庄"}],[{"name":"上海"},{"name":"汕头"}],[{"name":"上海"},{"name":"深圳"}],[{"name":"上海"},{"name":"青岛"}],[{"name":"上海"},{"name":"济南"}],[{"name":"上海"},{"name":"天津"}],[{"name":"上海"},{"name":"太原"}],[{"name":"上海"},{"name":"乌鲁木齐"}],[{"name":"上海"},{"name":"潍坊"}],[{"name":"上海"},{"name":"威海"}],[{"name":"上海"},{"name":"温州"}],[{"name":"上海"},{"name":"武汉"}],[{"name":"上海"},{"name":"厦门"}],[{"name":"上海"},{"name":"西宁"}],[{"name":"上海"},{"name":"徐州"}],[{"name":"上海"},{"name":"烟台"}],[{"name":"上海"},{"name":"珠海"}],[{"name":"广州"},{"name":"北海"}],[{"name":"广州"},{"name":"郑州"}],[{"name":"广州"},{"name":"长春"}],[{"name":"广州"},{"name":"重庆"}],[{"name":"广州"},{"name":"长沙"}],[{"name":"广州"},{"name":"成都"}],[{"name":"广州"},{"name":"常州"}],[{"name":"广州"},{"name":"大连"}],[{"name":"广州"},{"name":"福州"}],[{"name":"广州"},{"name":"海口"}],[{"name":"广州"},{"name":"呼和浩特"}],[{"name":"广州"},{"name":"合肥"}],[{"name":"广州"},{"name":"杭州"}],[{"name":"广州"},{"name":"哈尔滨"}],[{"name":"广州"},{"name":"舟山"}],[{"name":"广州"},{"name":"银川"}],[{"name":"广州"},{"name":"南昌"}],[{"name":"广州"},{"name":"昆明"}],[{"name":"广州"},{"name":"贵阳"}],[{"name":"广州"},{"name":"兰州"}],[{"name":"广州"},{"name":"拉萨"}],[{"name":"广州"},{"name":"连云港"}],[{"name":"广州"},{"name":"临沂"}],[{"name":"广州"},{"name":"柳州"}],[{"name":"广州"},{"name":"宁波"}],[{"name":"广州"},{"name":"南京"}],[{"name":"广州"},{"name":"南宁"}],[{"name":"广州"},{"name":"南通"}],[{"name":"广州"},{"name":"北京"}],[{"name":"广州"},{"name":"上海"}],[{"name":"广州"},{"name":"沈阳"}],[{"name":"广州"},{"name":"西安"}],[{"name":"广州"},{"name":"石家庄"}],[{"name":"广州"},{"name":"汕头"}],[{"name":"广州"},{"name":"青岛"}],[{"name":"广州"},{"name":"济南"}],[{"name":"广州"},{"name":"天津"}],[{"name":"广州"},{"name":"太原"}],[{"name":"广州"},{"name":"乌鲁木齐"}],[{"name":"广州"},{"name":"温州"}],[{"name":"广州"},{"name":"武汉"}],[{"name":"广州"},{"name":"无锡"}],[{"name":"广州"},{"name":"厦门"}],[{"name":"广州"},{"name":"西宁"}],[{"name":"广州"},{"name":"徐州"}],[{"name":"广州"},{"name":"烟台"}],[{"name":"广州"},{"name":"盐城"}]],"clickable":true,"symbol":["none","circle"],"smooth":true,"symbolSize":1,"large":false,"effect":{"show":false},"smoothness":0.2,"precision":2,"bundling":{"enable":false,"maxTurningAngle":45},"itemStyle":{"normal":{"color":"#fff","borderWidth":1,"borderColor":"rgba(30,144,255,0.5)"}}},"hoverable":false}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"legend":{"show":true,"data":[],"x":"left","y":"top","orient":"horizontal"}},"evals":[],"jsHooks":[]}</script>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">## add markLines with values
line.effect &lt;-<span class="st"> </span><span class="kw">list</span>(
    <span class="dt">show=</span><span class="ot">TRUE</span>, <span class="dt">scaleSize=</span><span class="dv">1</span>, <span class="dt">period=</span><span class="dv">30</span>, <span class="dt">color=</span><span class="st">&#39;#fff&#39;</span>, <span class="dt">shadowBlur=</span><span class="dv">10</span>)
line.style &lt;-<span class="st"> </span><span class="kw">list</span>(<span class="dt">normal=</span><span class="kw">itemStyle</span>(
    <span class="dt">borderWidth=</span><span class="dv">1</span>, <span class="dt">lineStyle=</span><span class="kw">lineStyle</span>(<span class="dt">type=</span><span class="st">&#39;solid&#39;</span>, <span class="dt">shadowBlur=</span><span class="dv">10</span>)))
g1 &lt;-<span class="st"> </span>g %&gt;%<span class="st"> </span>
<span class="st">    </span><span class="kw">addML</span>(<span class="dt">series=</span><span class="kw">c</span>(<span class="st">&#39;北京Top10&#39;</span>, <span class="st">&#39;上海Top10&#39;</span>, <span class="st">&#39;广州Top10&#39;</span>), <span class="dt">data=</span>target, 
          <span class="dt">smooth=</span><span class="ot">TRUE</span>, <span class="dt">effect=</span>line.effect, <span class="dt">itemStyle=</span>line.style)
g1</code></pre></div>
<div id="htmlwidget-142c65aba4f417b8739b" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-142c65aba4f417b8739b">{"x":{"series":[{"type":"map","mapType":"china","itemStyle":{"normal":{"label":{"show":false},"borderColor":"rgba(100,149,237,1)","borderWidth":0.5,"areaStyle":{"color":"#1b1b1b"}},"emphasis":{"label":{"show":true}}},"data":[],"geoCoord":{"上海":[121.4648,31.2891],"东莞":[113.8953,22.901],"东营":[118.7073,37.5513],"中山":[113.4229,22.478],"临汾":[111.4783,36.1615],"临沂":[118.3118,35.2936],"丹东":[124.541,40.4242],"丽水":[119.5642,28.1854],"乌鲁木齐":[87.9236,43.5883],"佛山":[112.8955,23.1097],"保定":[115.0488,39.0948],"兰州":[103.5901,36.3043],"包头":[110.3467,41.4899],"北京":[116.4551,40.2539],"北海":[109.314,21.6211],"南京":[118.8062,31.9208],"南宁":[108.479,23.1152],"南昌":[116.0046,28.6633],"南通":[121.1023,32.1625],"厦门":[118.1689,24.6478],"台州":[121.1353,28.6688],"合肥":[117.29,32.0581],"呼和浩特":[111.4124,40.4901],"咸阳":[108.4131,34.8706],"哈尔滨":[127.9688,45.368],"唐山":[118.4766,39.6826],"嘉兴":[120.9155,30.6354],"大同":[113.7854,39.8035],"大连":[122.2229,39.4409],"天津":[117.4219,39.4189],"太原":[112.3352,37.9413],"威海":[121.9482,37.1393],"宁波":[121.5967,29.6466],"宝鸡":[107.1826,34.3433],"宿迁":[118.5535,33.7775],"常州":[119.4543,31.5582],"广州":[113.5107,23.2196],"廊坊":[116.521,39.0509],"延安":[109.1052,36.4252],"张家口":[115.1477,40.8527],"徐州":[117.5208,34.3268],"德州":[116.6858,37.2107],"惠州":[114.6204,23.1647],"成都":[103.9526,30.7617],"扬州":[119.4653,32.8162],"承德":[117.5757,41.4075],"拉萨":[91.1865,30.1465],"无锡":[120.3442,31.5527],"日照":[119.2786,35.5023],"昆明":[102.9199,25.4663],"杭州":[119.5313,29.8773],"枣庄":[117.323,34.8926],"柳州":[109.3799,24.9774],"株洲":[113.5327,27.0319],"武汉":[114.3896,30.6628],"汕头":[117.1692,23.3405],"江门":[112.6318,22.1484],"沈阳":[123.1238,42.1216],"沧州":[116.8286,38.2104],"河源":[114.917,23.9722],"泉州":[118.3228,25.1147],"泰安":[117.0264,36.0516],"泰州":[120.0586,32.5525],"济南":[117.1582,36.8701],"济宁":[116.8286,35.3375],"海口":[110.3893,19.8516],"淄博":[118.0371,36.6064],"淮安":[118.927,33.4039],"深圳":[114.5435,22.5439],"清远":[112.9175,24.3292],"温州":[120.498,27.8119],"渭南":[109.7864,35.0299],"湖州":[119.8608,30.7782],"湘潭":[112.5439,27.7075],"滨州":[117.8174,37.4963],"潍坊":[119.0918,36.524],"烟台":[120.7397,37.5128],"玉溪":[101.9312,23.8898],"珠海":[113.7305,22.1155],"盐城":[120.2234,33.5577],"盘锦":[121.9482,41.0449],"石家庄":[114.4995,38.1006],"福州":[119.4543,25.9222],"秦皇岛":[119.2126,40.0232],"绍兴":[120.564,29.7565],"聊城":[115.9167,36.4032],"肇庆":[112.1265,23.5822],"舟山":[122.2559,30.2234],"苏州":[120.6519,31.3989],"莱芜":[117.6526,36.2714],"菏泽":[115.6201,35.2057],"营口":[122.4316,40.4297],"葫芦岛":[120.1575,40.578],"衡水":[115.8838,37.7161],"衢州":[118.6853,28.8666],"西宁":[101.4038,36.8207],"西安":[109.1162,34.2004],"贵阳":[106.6992,26.7682],"连云港":[119.1248,34.552],"邢台":[114.8071,37.2821],"邯郸":[114.4775,36.535],"郑州":[113.4668,34.6234],"鄂尔多斯":[108.9734,39.2487],"重庆":[107.7539,30.1904],"金华":[120.0037,29.1028],"铜川":[109.0393,35.1947],"银川":[106.3586,38.1775],"镇江":[119.4763,31.9702],"长春":[125.8154,44.2584],"长沙":[113.0823,28.2568],"长治":[112.8625,36.4746],"阳泉":[113.4778,38.0951],"青岛":[120.4651,36.3373],"韶关":[113.7964,24.7028]},"markLine":{"data":[[{"name":"北京"},{"name":"包头"}],[{"name":"北京"},{"name":"北海"}],[{"name":"北京"},{"name":"广州"}],[{"name":"北京"},{"name":"郑州"}],[{"name":"北京"},{"name":"长春"}],[{"name":"北京"},{"name":"长治"}],[{"name":"北京"},{"name":"重庆"}],[{"name":"北京"},{"name":"长沙"}],[{"name":"北京"},{"name":"成都"}],[{"name":"北京"},{"name":"常州"}],[{"name":"北京"},{"name":"丹东"}],[{"name":"北京"},{"name":"大连"}],[{"name":"北京"},{"name":"东营"}],[{"name":"北京"},{"name":"延安"}],[{"name":"北京"},{"name":"福州"}],[{"name":"北京"},{"name":"海口"}],[{"name":"北京"},{"name":"呼和浩特"}],[{"name":"北京"},{"name":"合肥"}],[{"name":"北京"},{"name":"杭州"}],[{"name":"北京"},{"name":"哈尔滨"}],[{"name":"北京"},{"name":"舟山"}],[{"name":"北京"},{"name":"银川"}],[{"name":"北京"},{"name":"衢州"}],[{"name":"北京"},{"name":"南昌"}],[{"name":"北京"},{"name":"昆明"}],[{"name":"北京"},{"name":"贵阳"}],[{"name":"北京"},{"name":"兰州"}],[{"name":"北京"},{"name":"拉萨"}],[{"name":"北京"},{"name":"连云港"}],[{"name":"北京"},{"name":"临沂"}],[{"name":"北京"},{"name":"柳州"}],[{"name":"北京"},{"name":"宁波"}],[{"name":"北京"},{"name":"南京"}],[{"name":"北京"},{"name":"南宁"}],[{"name":"北京"},{"name":"南通"}],[{"name":"北京"},{"name":"上海"}],[{"name":"北京"},{"name":"沈阳"}],[{"name":"北京"},{"name":"西安"}],[{"name":"北京"},{"name":"汕头"}],[{"name":"北京"},{"name":"深圳"}],[{"name":"北京"},{"name":"青岛"}],[{"name":"北京"},{"name":"济南"}],[{"name":"北京"},{"name":"太原"}],[{"name":"北京"},{"name":"乌鲁木齐"}],[{"name":"北京"},{"name":"潍坊"}],[{"name":"北京"},{"name":"威海"}],[{"name":"北京"},{"name":"温州"}],[{"name":"北京"},{"name":"武汉"}],[{"name":"北京"},{"name":"无锡"}],[{"name":"北京"},{"name":"厦门"}],[{"name":"北京"},{"name":"西宁"}],[{"name":"北京"},{"name":"徐州"}],[{"name":"北京"},{"name":"烟台"}],[{"name":"北京"},{"name":"盐城"}],[{"name":"北京"},{"name":"珠海"}],[{"name":"上海"},{"name":"包头"}],[{"name":"上海"},{"name":"北海"}],[{"name":"上海"},{"name":"广州"}],[{"name":"上海"},{"name":"郑州"}],[{"name":"上海"},{"name":"长春"}],[{"name":"上海"},{"name":"重庆"}],[{"name":"上海"},{"name":"长沙"}],[{"name":"上海"},{"name":"成都"}],[{"name":"上海"},{"name":"丹东"}],[{"name":"上海"},{"name":"大连"}],[{"name":"上海"},{"name":"福州"}],[{"name":"上海"},{"name":"海口"}],[{"name":"上海"},{"name":"呼和浩特"}],[{"name":"上海"},{"name":"合肥"}],[{"name":"上海"},{"name":"哈尔滨"}],[{"name":"上海"},{"name":"舟山"}],[{"name":"上海"},{"name":"银川"}],[{"name":"上海"},{"name":"南昌"}],[{"name":"上海"},{"name":"昆明"}],[{"name":"上海"},{"name":"贵阳"}],[{"name":"上海"},{"name":"兰州"}],[{"name":"上海"},{"name":"拉萨"}],[{"name":"上海"},{"name":"连云港"}],[{"name":"上海"},{"name":"临沂"}],[{"name":"上海"},{"name":"柳州"}],[{"name":"上海"},{"name":"宁波"}],[{"name":"上海"},{"name":"南宁"}],[{"name":"上海"},{"name":"北京"}],[{"name":"上海"},{"name":"沈阳"}],[{"name":"上海"},{"name":"秦皇岛"}],[{"name":"上海"},{"name":"西安"}],[{"name":"上海"},{"name":"石家庄"}],[{"name":"上海"},{"name":"汕头"}],[{"name":"上海"},{"name":"深圳"}],[{"name":"上海"},{"name":"青岛"}],[{"name":"上海"},{"name":"济南"}],[{"name":"上海"},{"name":"天津"}],[{"name":"上海"},{"name":"太原"}],[{"name":"上海"},{"name":"乌鲁木齐"}],[{"name":"上海"},{"name":"潍坊"}],[{"name":"上海"},{"name":"威海"}],[{"name":"上海"},{"name":"温州"}],[{"name":"上海"},{"name":"武汉"}],[{"name":"上海"},{"name":"厦门"}],[{"name":"上海"},{"name":"西宁"}],[{"name":"上海"},{"name":"徐州"}],[{"name":"上海"},{"name":"烟台"}],[{"name":"上海"},{"name":"珠海"}],[{"name":"广州"},{"name":"北海"}],[{"name":"广州"},{"name":"郑州"}],[{"name":"广州"},{"name":"长春"}],[{"name":"广州"},{"name":"重庆"}],[{"name":"广州"},{"name":"长沙"}],[{"name":"广州"},{"name":"成都"}],[{"name":"广州"},{"name":"常州"}],[{"name":"广州"},{"name":"大连"}],[{"name":"广州"},{"name":"福州"}],[{"name":"广州"},{"name":"海口"}],[{"name":"广州"},{"name":"呼和浩特"}],[{"name":"广州"},{"name":"合肥"}],[{"name":"广州"},{"name":"杭州"}],[{"name":"广州"},{"name":"哈尔滨"}],[{"name":"广州"},{"name":"舟山"}],[{"name":"广州"},{"name":"银川"}],[{"name":"广州"},{"name":"南昌"}],[{"name":"广州"},{"name":"昆明"}],[{"name":"广州"},{"name":"贵阳"}],[{"name":"广州"},{"name":"兰州"}],[{"name":"广州"},{"name":"拉萨"}],[{"name":"广州"},{"name":"连云港"}],[{"name":"广州"},{"name":"临沂"}],[{"name":"广州"},{"name":"柳州"}],[{"name":"广州"},{"name":"宁波"}],[{"name":"广州"},{"name":"南京"}],[{"name":"广州"},{"name":"南宁"}],[{"name":"广州"},{"name":"南通"}],[{"name":"广州"},{"name":"北京"}],[{"name":"广州"},{"name":"上海"}],[{"name":"广州"},{"name":"沈阳"}],[{"name":"广州"},{"name":"西安"}],[{"name":"广州"},{"name":"石家庄"}],[{"name":"广州"},{"name":"汕头"}],[{"name":"广州"},{"name":"青岛"}],[{"name":"广州"},{"name":"济南"}],[{"name":"广州"},{"name":"天津"}],[{"name":"广州"},{"name":"太原"}],[{"name":"广州"},{"name":"乌鲁木齐"}],[{"name":"广州"},{"name":"温州"}],[{"name":"广州"},{"name":"武汉"}],[{"name":"广州"},{"name":"无锡"}],[{"name":"广州"},{"name":"厦门"}],[{"name":"广州"},{"name":"西宁"}],[{"name":"广州"},{"name":"徐州"}],[{"name":"广州"},{"name":"烟台"}],[{"name":"广州"},{"name":"盐城"}]],"clickable":true,"symbol":["none","circle"],"smooth":true,"symbolSize":1,"large":false,"effect":{"show":false},"smoothness":0.2,"precision":2,"bundling":{"enable":false,"maxTurningAngle":45},"itemStyle":{"normal":{"color":"#fff","borderWidth":1,"borderColor":"rgba(30,144,255,0.5)"}}},"hoverable":false},{"name":"北京Top10","type":"map","data":[["-"]],"markLine":{"data":[[{"name":"北京","value":95},{"name":"上海"}],[{"name":"北京","value":90},{"name":"广州"}],[{"name":"北京","value":80},{"name":"大连"}],[{"name":"北京","value":70},{"name":"南宁"}],[{"name":"北京","value":60},{"name":"南昌"}],[{"name":"北京","value":50},{"name":"拉萨"}],[{"name":"北京","value":40},{"name":"长春"}],[{"name":"北京","value":30},{"name":"包头"}],[{"name":"北京","value":20},{"name":"重庆"}],[{"name":"北京","value":10},{"name":"常州"}]],"clickable":true,"symbol":["circle","arrow"],"smooth":true,"symbolSize":[2,4],"large":false,"effect":{"show":true,"scaleSize":1,"period":30,"color":"#fff","shadowBlur":10},"smoothness":0.2,"precision":2,"bundling":{"enable":false,"maxTurningAngle":45},"itemStyle":{"normal":{"borderWidth":1,"lineStyle":{"type":"solid","shadowBlur":10}}}},"mapType":"china"},{"name":"上海Top10","type":"map","data":[["-"]],"markLine":{"data":[[{"name":"上海","value":95},{"name":"包头"}],[{"name":"上海","value":90},{"name":"昆明"}],[{"name":"上海","value":80},{"name":"广州"}],[{"name":"上海","value":70},{"name":"郑州"}],[{"name":"上海","value":60},{"name":"长春"}],[{"name":"上海","value":50},{"name":"重庆"}],[{"name":"上海","value":40},{"name":"长沙"}],[{"name":"上海","value":30},{"name":"北京"}],[{"name":"上海","value":20},{"name":"丹东"}],[{"name":"上海","value":10},{"name":"大连"}]],"clickable":true,"symbol":["circle","arrow"],"smooth":true,"symbolSize":[2,4],"large":false,"effect":{"show":true,"scaleSize":1,"period":30,"color":"#fff","shadowBlur":10},"smoothness":0.2,"precision":2,"bundling":{"enable":false,"maxTurningAngle":45},"itemStyle":{"normal":{"borderWidth":1,"lineStyle":{"type":"solid","shadowBlur":10}}}},"mapType":"china"},{"name":"广州Top10","type":"map","data":[["-"]],"markLine":{"data":[[{"name":"广州","value":95},{"name":"福州"}],[{"name":"广州","value":90},{"name":"太原"}],[{"name":"广州","value":80},{"name":"长春"}],[{"name":"广州","value":70},{"name":"重庆"}],[{"name":"广州","value":60},{"name":"西安"}],[{"name":"广州","value":50},{"name":"成都"}],[{"name":"广州","value":40},{"name":"常州"}],[{"name":"广州","value":30},{"name":"北京"}],[{"name":"广州","value":20},{"name":"北海"}],[{"name":"广州","value":10},{"name":"海口"}]],"clickable":true,"symbol":["circle","arrow"],"smooth":true,"symbolSize":[2,4],"large":false,"effect":{"show":true,"scaleSize":1,"period":30,"color":"#fff","shadowBlur":10},"smoothness":0.2,"precision":2,"bundling":{"enable":false,"maxTurningAngle":45},"itemStyle":{"normal":{"borderWidth":1,"lineStyle":{"type":"solid","shadowBlur":10}}}},"mapType":"china"}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"legend":{"show":true,"data":["北京Top10","上海Top10","广州Top10"],"x":"left","y":"top","orient":"horizontal"}},"evals":[],"jsHooks":[]}</script>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">## add markPoints
## series better be 2, 3, 4 rather than the series names
jsSymbolSize &lt;-<span class="st"> </span><span class="kw">JS</span>(<span class="st">&#39;function (v) {return 10+v/10;}&#39;</span>)
mp.style &lt;-<span class="st"> </span><span class="kw">list</span>(<span class="dt">normal=</span><span class="kw">itemStyle</span>(<span class="dt">label=</span><span class="kw">labelStyle</span>(<span class="dt">show=</span><span class="ot">FALSE</span>)), 
                 <span class="dt">emphasis=</span><span class="kw">itemStyle</span>(<span class="dt">label=</span><span class="kw">labelStyle</span>(<span class="dt">position=</span><span class="st">&#39;top&#39;</span>)))
g2 &lt;-<span class="st"> </span>g1 %&gt;%
<span class="st">    </span><span class="kw">addMP</span>(<span class="dt">series=</span><span class="dv">2</span>:<span class="dv">4</span>, <span class="dt">data=</span>target[,<span class="kw">c</span>(<span class="st">&quot;name2&quot;</span>, <span class="st">&quot;value&quot;</span>, <span class="st">&quot;series&quot;</span>)],
          <span class="dt">effect=</span><span class="kw">list</span>(<span class="dt">show=</span><span class="ot">TRUE</span>), <span class="dt">symbolSize=</span>jsSymbolSize, 
          <span class="dt">itmeStyle=</span>mp.style) 
g2</code></pre></div>
<div id="htmlwidget-ee9ff95f7c4b3458f652" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-ee9ff95f7c4b3458f652">{"x":{"series":[{"type":"map","mapType":"china","itemStyle":{"normal":{"label":{"show":false},"borderColor":"rgba(100,149,237,1)","borderWidth":0.5,"areaStyle":{"color":"#1b1b1b"}},"emphasis":{"label":{"show":true}}},"data":[],"geoCoord":{"上海":[121.4648,31.2891],"东莞":[113.8953,22.901],"东营":[118.7073,37.5513],"中山":[113.4229,22.478],"临汾":[111.4783,36.1615],"临沂":[118.3118,35.2936],"丹东":[124.541,40.4242],"丽水":[119.5642,28.1854],"乌鲁木齐":[87.9236,43.5883],"佛山":[112.8955,23.1097],"保定":[115.0488,39.0948],"兰州":[103.5901,36.3043],"包头":[110.3467,41.4899],"北京":[116.4551,40.2539],"北海":[109.314,21.6211],"南京":[118.8062,31.9208],"南宁":[108.479,23.1152],"南昌":[116.0046,28.6633],"南通":[121.1023,32.1625],"厦门":[118.1689,24.6478],"台州":[121.1353,28.6688],"合肥":[117.29,32.0581],"呼和浩特":[111.4124,40.4901],"咸阳":[108.4131,34.8706],"哈尔滨":[127.9688,45.368],"唐山":[118.4766,39.6826],"嘉兴":[120.9155,30.6354],"大同":[113.7854,39.8035],"大连":[122.2229,39.4409],"天津":[117.4219,39.4189],"太原":[112.3352,37.9413],"威海":[121.9482,37.1393],"宁波":[121.5967,29.6466],"宝鸡":[107.1826,34.3433],"宿迁":[118.5535,33.7775],"常州":[119.4543,31.5582],"广州":[113.5107,23.2196],"廊坊":[116.521,39.0509],"延安":[109.1052,36.4252],"张家口":[115.1477,40.8527],"徐州":[117.5208,34.3268],"德州":[116.6858,37.2107],"惠州":[114.6204,23.1647],"成都":[103.9526,30.7617],"扬州":[119.4653,32.8162],"承德":[117.5757,41.4075],"拉萨":[91.1865,30.1465],"无锡":[120.3442,31.5527],"日照":[119.2786,35.5023],"昆明":[102.9199,25.4663],"杭州":[119.5313,29.8773],"枣庄":[117.323,34.8926],"柳州":[109.3799,24.9774],"株洲":[113.5327,27.0319],"武汉":[114.3896,30.6628],"汕头":[117.1692,23.3405],"江门":[112.6318,22.1484],"沈阳":[123.1238,42.1216],"沧州":[116.8286,38.2104],"河源":[114.917,23.9722],"泉州":[118.3228,25.1147],"泰安":[117.0264,36.0516],"泰州":[120.0586,32.5525],"济南":[117.1582,36.8701],"济宁":[116.8286,35.3375],"海口":[110.3893,19.8516],"淄博":[118.0371,36.6064],"淮安":[118.927,33.4039],"深圳":[114.5435,22.5439],"清远":[112.9175,24.3292],"温州":[120.498,27.8119],"渭南":[109.7864,35.0299],"湖州":[119.8608,30.7782],"湘潭":[112.5439,27.7075],"滨州":[117.8174,37.4963],"潍坊":[119.0918,36.524],"烟台":[120.7397,37.5128],"玉溪":[101.9312,23.8898],"珠海":[113.7305,22.1155],"盐城":[120.2234,33.5577],"盘锦":[121.9482,41.0449],"石家庄":[114.4995,38.1006],"福州":[119.4543,25.9222],"秦皇岛":[119.2126,40.0232],"绍兴":[120.564,29.7565],"聊城":[115.9167,36.4032],"肇庆":[112.1265,23.5822],"舟山":[122.2559,30.2234],"苏州":[120.6519,31.3989],"莱芜":[117.6526,36.2714],"菏泽":[115.6201,35.2057],"营口":[122.4316,40.4297],"葫芦岛":[120.1575,40.578],"衡水":[115.8838,37.7161],"衢州":[118.6853,28.8666],"西宁":[101.4038,36.8207],"西安":[109.1162,34.2004],"贵阳":[106.6992,26.7682],"连云港":[119.1248,34.552],"邢台":[114.8071,37.2821],"邯郸":[114.4775,36.535],"郑州":[113.4668,34.6234],"鄂尔多斯":[108.9734,39.2487],"重庆":[107.7539,30.1904],"金华":[120.0037,29.1028],"铜川":[109.0393,35.1947],"银川":[106.3586,38.1775],"镇江":[119.4763,31.9702],"长春":[125.8154,44.2584],"长沙":[113.0823,28.2568],"长治":[112.8625,36.4746],"阳泉":[113.4778,38.0951],"青岛":[120.4651,36.3373],"韶关":[113.7964,24.7028]},"markLine":{"data":[[{"name":"北京"},{"name":"包头"}],[{"name":"北京"},{"name":"北海"}],[{"name":"北京"},{"name":"广州"}],[{"name":"北京"},{"name":"郑州"}],[{"name":"北京"},{"name":"长春"}],[{"name":"北京"},{"name":"长治"}],[{"name":"北京"},{"name":"重庆"}],[{"name":"北京"},{"name":"长沙"}],[{"name":"北京"},{"name":"成都"}],[{"name":"北京"},{"name":"常州"}],[{"name":"北京"},{"name":"丹东"}],[{"name":"北京"},{"name":"大连"}],[{"name":"北京"},{"name":"东营"}],[{"name":"北京"},{"name":"延安"}],[{"name":"北京"},{"name":"福州"}],[{"name":"北京"},{"name":"海口"}],[{"name":"北京"},{"name":"呼和浩特"}],[{"name":"北京"},{"name":"合肥"}],[{"name":"北京"},{"name":"杭州"}],[{"name":"北京"},{"name":"哈尔滨"}],[{"name":"北京"},{"name":"舟山"}],[{"name":"北京"},{"name":"银川"}],[{"name":"北京"},{"name":"衢州"}],[{"name":"北京"},{"name":"南昌"}],[{"name":"北京"},{"name":"昆明"}],[{"name":"北京"},{"name":"贵阳"}],[{"name":"北京"},{"name":"兰州"}],[{"name":"北京"},{"name":"拉萨"}],[{"name":"北京"},{"name":"连云港"}],[{"name":"北京"},{"name":"临沂"}],[{"name":"北京"},{"name":"柳州"}],[{"name":"北京"},{"name":"宁波"}],[{"name":"北京"},{"name":"南京"}],[{"name":"北京"},{"name":"南宁"}],[{"name":"北京"},{"name":"南通"}],[{"name":"北京"},{"name":"上海"}],[{"name":"北京"},{"name":"沈阳"}],[{"name":"北京"},{"name":"西安"}],[{"name":"北京"},{"name":"汕头"}],[{"name":"北京"},{"name":"深圳"}],[{"name":"北京"},{"name":"青岛"}],[{"name":"北京"},{"name":"济南"}],[{"name":"北京"},{"name":"太原"}],[{"name":"北京"},{"name":"乌鲁木齐"}],[{"name":"北京"},{"name":"潍坊"}],[{"name":"北京"},{"name":"威海"}],[{"name":"北京"},{"name":"温州"}],[{"name":"北京"},{"name":"武汉"}],[{"name":"北京"},{"name":"无锡"}],[{"name":"北京"},{"name":"厦门"}],[{"name":"北京"},{"name":"西宁"}],[{"name":"北京"},{"name":"徐州"}],[{"name":"北京"},{"name":"烟台"}],[{"name":"北京"},{"name":"盐城"}],[{"name":"北京"},{"name":"珠海"}],[{"name":"上海"},{"name":"包头"}],[{"name":"上海"},{"name":"北海"}],[{"name":"上海"},{"name":"广州"}],[{"name":"上海"},{"name":"郑州"}],[{"name":"上海"},{"name":"长春"}],[{"name":"上海"},{"name":"重庆"}],[{"name":"上海"},{"name":"长沙"}],[{"name":"上海"},{"name":"成都"}],[{"name":"上海"},{"name":"丹东"}],[{"name":"上海"},{"name":"大连"}],[{"name":"上海"},{"name":"福州"}],[{"name":"上海"},{"name":"海口"}],[{"name":"上海"},{"name":"呼和浩特"}],[{"name":"上海"},{"name":"合肥"}],[{"name":"上海"},{"name":"哈尔滨"}],[{"name":"上海"},{"name":"舟山"}],[{"name":"上海"},{"name":"银川"}],[{"name":"上海"},{"name":"南昌"}],[{"name":"上海"},{"name":"昆明"}],[{"name":"上海"},{"name":"贵阳"}],[{"name":"上海"},{"name":"兰州"}],[{"name":"上海"},{"name":"拉萨"}],[{"name":"上海"},{"name":"连云港"}],[{"name":"上海"},{"name":"临沂"}],[{"name":"上海"},{"name":"柳州"}],[{"name":"上海"},{"name":"宁波"}],[{"name":"上海"},{"name":"南宁"}],[{"name":"上海"},{"name":"北京"}],[{"name":"上海"},{"name":"沈阳"}],[{"name":"上海"},{"name":"秦皇岛"}],[{"name":"上海"},{"name":"西安"}],[{"name":"上海"},{"name":"石家庄"}],[{"name":"上海"},{"name":"汕头"}],[{"name":"上海"},{"name":"深圳"}],[{"name":"上海"},{"name":"青岛"}],[{"name":"上海"},{"name":"济南"}],[{"name":"上海"},{"name":"天津"}],[{"name":"上海"},{"name":"太原"}],[{"name":"上海"},{"name":"乌鲁木齐"}],[{"name":"上海"},{"name":"潍坊"}],[{"name":"上海"},{"name":"威海"}],[{"name":"上海"},{"name":"温州"}],[{"name":"上海"},{"name":"武汉"}],[{"name":"上海"},{"name":"厦门"}],[{"name":"上海"},{"name":"西宁"}],[{"name":"上海"},{"name":"徐州"}],[{"name":"上海"},{"name":"烟台"}],[{"name":"上海"},{"name":"珠海"}],[{"name":"广州"},{"name":"北海"}],[{"name":"广州"},{"name":"郑州"}],[{"name":"广州"},{"name":"长春"}],[{"name":"广州"},{"name":"重庆"}],[{"name":"广州"},{"name":"长沙"}],[{"name":"广州"},{"name":"成都"}],[{"name":"广州"},{"name":"常州"}],[{"name":"广州"},{"name":"大连"}],[{"name":"广州"},{"name":"福州"}],[{"name":"广州"},{"name":"海口"}],[{"name":"广州"},{"name":"呼和浩特"}],[{"name":"广州"},{"name":"合肥"}],[{"name":"广州"},{"name":"杭州"}],[{"name":"广州"},{"name":"哈尔滨"}],[{"name":"广州"},{"name":"舟山"}],[{"name":"广州"},{"name":"银川"}],[{"name":"广州"},{"name":"南昌"}],[{"name":"广州"},{"name":"昆明"}],[{"name":"广州"},{"name":"贵阳"}],[{"name":"广州"},{"name":"兰州"}],[{"name":"广州"},{"name":"拉萨"}],[{"name":"广州"},{"name":"连云港"}],[{"name":"广州"},{"name":"临沂"}],[{"name":"广州"},{"name":"柳州"}],[{"name":"广州"},{"name":"宁波"}],[{"name":"广州"},{"name":"南京"}],[{"name":"广州"},{"name":"南宁"}],[{"name":"广州"},{"name":"南通"}],[{"name":"广州"},{"name":"北京"}],[{"name":"广州"},{"name":"上海"}],[{"name":"广州"},{"name":"沈阳"}],[{"name":"广州"},{"name":"西安"}],[{"name":"广州"},{"name":"石家庄"}],[{"name":"广州"},{"name":"汕头"}],[{"name":"广州"},{"name":"青岛"}],[{"name":"广州"},{"name":"济南"}],[{"name":"广州"},{"name":"天津"}],[{"name":"广州"},{"name":"太原"}],[{"name":"广州"},{"name":"乌鲁木齐"}],[{"name":"广州"},{"name":"温州"}],[{"name":"广州"},{"name":"武汉"}],[{"name":"广州"},{"name":"无锡"}],[{"name":"广州"},{"name":"厦门"}],[{"name":"广州"},{"name":"西宁"}],[{"name":"广州"},{"name":"徐州"}],[{"name":"广州"},{"name":"烟台"}],[{"name":"广州"},{"name":"盐城"}]],"clickable":true,"symbol":["none","circle"],"smooth":true,"symbolSize":1,"large":false,"effect":{"show":false},"smoothness":0.2,"precision":2,"bundling":{"enable":false,"maxTurningAngle":45},"itemStyle":{"normal":{"color":"#fff","borderWidth":1,"borderColor":"rgba(30,144,255,0.5)"}}},"hoverable":false},{"name":"北京Top10","type":"map","data":[["-"]],"markLine":{"data":[[{"name":"北京","value":95},{"name":"上海"}],[{"name":"北京","value":90},{"name":"广州"}],[{"name":"北京","value":80},{"name":"大连"}],[{"name":"北京","value":70},{"name":"南宁"}],[{"name":"北京","value":60},{"name":"南昌"}],[{"name":"北京","value":50},{"name":"拉萨"}],[{"name":"北京","value":40},{"name":"长春"}],[{"name":"北京","value":30},{"name":"包头"}],[{"name":"北京","value":20},{"name":"重庆"}],[{"name":"北京","value":10},{"name":"常州"}]],"clickable":true,"symbol":["circle","arrow"],"smooth":true,"symbolSize":[2,4],"large":false,"effect":{"show":true,"scaleSize":1,"period":30,"color":"#fff","shadowBlur":10},"smoothness":0.2,"precision":2,"bundling":{"enable":false,"maxTurningAngle":45},"itemStyle":{"normal":{"borderWidth":1,"lineStyle":{"type":"solid","shadowBlur":10}}}},"mapType":"china","markPoint":{"data":[{"name":"上海","value":95},{"name":"广州","value":90},{"name":"大连","value":80},{"name":"南宁","value":70},{"name":"南昌","value":60},{"name":"拉萨","value":50},{"name":"长春","value":40},{"name":"包头","value":30},{"name":"重庆","value":20},{"name":"常州","value":10}],"clickable":true,"symbol":"pin","symbolSize":"function (v) {return 10+v/10;}","large":false,"effect":{"show":true}}},{"name":"上海Top10","type":"map","data":[["-"]],"markLine":{"data":[[{"name":"上海","value":95},{"name":"包头"}],[{"name":"上海","value":90},{"name":"昆明"}],[{"name":"上海","value":80},{"name":"广州"}],[{"name":"上海","value":70},{"name":"郑州"}],[{"name":"上海","value":60},{"name":"长春"}],[{"name":"上海","value":50},{"name":"重庆"}],[{"name":"上海","value":40},{"name":"长沙"}],[{"name":"上海","value":30},{"name":"北京"}],[{"name":"上海","value":20},{"name":"丹东"}],[{"name":"上海","value":10},{"name":"大连"}]],"clickable":true,"symbol":["circle","arrow"],"smooth":true,"symbolSize":[2,4],"large":false,"effect":{"show":true,"scaleSize":1,"period":30,"color":"#fff","shadowBlur":10},"smoothness":0.2,"precision":2,"bundling":{"enable":false,"maxTurningAngle":45},"itemStyle":{"normal":{"borderWidth":1,"lineStyle":{"type":"solid","shadowBlur":10}}}},"mapType":"china","markPoint":{"data":[{"name":"包头","value":95},{"name":"昆明","value":90},{"name":"广州","value":80},{"name":"郑州","value":70},{"name":"长春","value":60},{"name":"重庆","value":50},{"name":"长沙","value":40},{"name":"北京","value":30},{"name":"丹东","value":20},{"name":"大连","value":10}],"clickable":true,"symbol":"pin","symbolSize":"function (v) {return 10+v/10;}","large":false,"effect":{"show":true}}},{"name":"广州Top10","type":"map","data":[["-"]],"markLine":{"data":[[{"name":"广州","value":95},{"name":"福州"}],[{"name":"广州","value":90},{"name":"太原"}],[{"name":"广州","value":80},{"name":"长春"}],[{"name":"广州","value":70},{"name":"重庆"}],[{"name":"广州","value":60},{"name":"西安"}],[{"name":"广州","value":50},{"name":"成都"}],[{"name":"广州","value":40},{"name":"常州"}],[{"name":"广州","value":30},{"name":"北京"}],[{"name":"广州","value":20},{"name":"北海"}],[{"name":"广州","value":10},{"name":"海口"}]],"clickable":true,"symbol":["circle","arrow"],"smooth":true,"symbolSize":[2,4],"large":false,"effect":{"show":true,"scaleSize":1,"period":30,"color":"#fff","shadowBlur":10},"smoothness":0.2,"precision":2,"bundling":{"enable":false,"maxTurningAngle":45},"itemStyle":{"normal":{"borderWidth":1,"lineStyle":{"type":"solid","shadowBlur":10}}}},"mapType":"china","markPoint":{"data":[{"name":"福州","value":95},{"name":"太原","value":90},{"name":"长春","value":80},{"name":"重庆","value":70},{"name":"西安","value":60},{"name":"成都","value":50},{"name":"常州","value":40},{"name":"北京","value":30},{"name":"北海","value":20},{"name":"海口","value":10}],"clickable":true,"symbol":"pin","symbolSize":"function (v) {return 10+v/10;}","large":false,"effect":{"show":true}}}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"legend":{"show":true,"data":["北京Top10","上海Top10","广州Top10"],"x":"left","y":"top","orient":"horizontal"}},"evals":["series.1.markPoint.symbolSize","series.2.markPoint.symbolSize","series.3.markPoint.symbolSize"],"jsHooks":[]}</script>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">## setDataRange
g3 &lt;-<span class="st"> </span>g2 %&gt;%
<span class="st">    </span><span class="kw">setDataRange</span>(
        <span class="dt">color=</span><span class="kw">c</span>(<span class="st">&#39;#ff3333&#39;</span>, <span class="st">&#39;orange&#39;</span>, <span class="st">&#39;yellow&#39;</span>,<span class="st">&#39;limegreen&#39;</span>,<span class="st">&#39;aquamarine&#39;</span>),
        <span class="dt">valueRange=</span><span class="kw">c</span>(<span class="dv">0</span>, <span class="dv">100</span>), <span class="dt">textStyle=</span><span class="kw">list</span>(<span class="dt">color=</span><span class="st">&#39;#fff&#39;</span>),
        <span class="dt">splitNumber=</span><span class="dv">0</span>)

## setTheme
g3 &lt;-<span class="st"> </span>g3 %&gt;%<span class="st"> </span><span class="kw">setLegend</span>(<span class="dt">pos=</span><span class="dv">10</span>, <span class="dt">selected=</span><span class="st">&#39;上海Top10&#39;</span>, <span class="dt">textStyle=</span><span class="kw">list</span>(<span class="dt">color=</span><span class="st">&#39;#fff&#39;</span>)) %&gt;%
<span class="st">    </span><span class="kw">setTheme</span>(<span class="dt">palette=</span><span class="kw">c</span>(<span class="st">&#39;gold&#39;</span>,<span class="st">&#39;aquamarine&#39;</span>,<span class="st">&#39;limegreen&#39;</span>), <span class="dt">bgColor=</span><span class="st">&#39;#1b1b1b&#39;</span>) %&gt;%
<span class="st">    </span><span class="kw">setToolbox</span>(<span class="dt">pos=</span><span class="dv">3</span>) %&gt;%<span class="st"> </span>
<span class="st">    </span><span class="kw">setTitle</span>(<span class="st">&#39;Baidu Migration&#39;</span>, <span class="st">&#39;Fictious Data&#39;</span>, <span class="dt">pos=</span><span class="dv">12</span>, 
             <span class="dt">textStyle=</span><span class="kw">list</span>(<span class="dt">color=</span><span class="st">&#39;white&#39;</span>))
g3</code></pre></div>
<div id="htmlwidget-481024accfe4e4b4f31d" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-481024accfe4e4b4f31d">{"x":{"series":[{"type":"map","mapType":"china","itemStyle":{"normal":{"label":{"show":false},"borderColor":"rgba(100,149,237,1)","borderWidth":0.5,"areaStyle":{"color":"#1b1b1b"}},"emphasis":{"label":{"show":true}}},"data":[],"geoCoord":{"上海":[121.4648,31.2891],"东莞":[113.8953,22.901],"东营":[118.7073,37.5513],"中山":[113.4229,22.478],"临汾":[111.4783,36.1615],"临沂":[118.3118,35.2936],"丹东":[124.541,40.4242],"丽水":[119.5642,28.1854],"乌鲁木齐":[87.9236,43.5883],"佛山":[112.8955,23.1097],"保定":[115.0488,39.0948],"兰州":[103.5901,36.3043],"包头":[110.3467,41.4899],"北京":[116.4551,40.2539],"北海":[109.314,21.6211],"南京":[118.8062,31.9208],"南宁":[108.479,23.1152],"南昌":[116.0046,28.6633],"南通":[121.1023,32.1625],"厦门":[118.1689,24.6478],"台州":[121.1353,28.6688],"合肥":[117.29,32.0581],"呼和浩特":[111.4124,40.4901],"咸阳":[108.4131,34.8706],"哈尔滨":[127.9688,45.368],"唐山":[118.4766,39.6826],"嘉兴":[120.9155,30.6354],"大同":[113.7854,39.8035],"大连":[122.2229,39.4409],"天津":[117.4219,39.4189],"太原":[112.3352,37.9413],"威海":[121.9482,37.1393],"宁波":[121.5967,29.6466],"宝鸡":[107.1826,34.3433],"宿迁":[118.5535,33.7775],"常州":[119.4543,31.5582],"广州":[113.5107,23.2196],"廊坊":[116.521,39.0509],"延安":[109.1052,36.4252],"张家口":[115.1477,40.8527],"徐州":[117.5208,34.3268],"德州":[116.6858,37.2107],"惠州":[114.6204,23.1647],"成都":[103.9526,30.7617],"扬州":[119.4653,32.8162],"承德":[117.5757,41.4075],"拉萨":[91.1865,30.1465],"无锡":[120.3442,31.5527],"日照":[119.2786,35.5023],"昆明":[102.9199,25.4663],"杭州":[119.5313,29.8773],"枣庄":[117.323,34.8926],"柳州":[109.3799,24.9774],"株洲":[113.5327,27.0319],"武汉":[114.3896,30.6628],"汕头":[117.1692,23.3405],"江门":[112.6318,22.1484],"沈阳":[123.1238,42.1216],"沧州":[116.8286,38.2104],"河源":[114.917,23.9722],"泉州":[118.3228,25.1147],"泰安":[117.0264,36.0516],"泰州":[120.0586,32.5525],"济南":[117.1582,36.8701],"济宁":[116.8286,35.3375],"海口":[110.3893,19.8516],"淄博":[118.0371,36.6064],"淮安":[118.927,33.4039],"深圳":[114.5435,22.5439],"清远":[112.9175,24.3292],"温州":[120.498,27.8119],"渭南":[109.7864,35.0299],"湖州":[119.8608,30.7782],"湘潭":[112.5439,27.7075],"滨州":[117.8174,37.4963],"潍坊":[119.0918,36.524],"烟台":[120.7397,37.5128],"玉溪":[101.9312,23.8898],"珠海":[113.7305,22.1155],"盐城":[120.2234,33.5577],"盘锦":[121.9482,41.0449],"石家庄":[114.4995,38.1006],"福州":[119.4543,25.9222],"秦皇岛":[119.2126,40.0232],"绍兴":[120.564,29.7565],"聊城":[115.9167,36.4032],"肇庆":[112.1265,23.5822],"舟山":[122.2559,30.2234],"苏州":[120.6519,31.3989],"莱芜":[117.6526,36.2714],"菏泽":[115.6201,35.2057],"营口":[122.4316,40.4297],"葫芦岛":[120.1575,40.578],"衡水":[115.8838,37.7161],"衢州":[118.6853,28.8666],"西宁":[101.4038,36.8207],"西安":[109.1162,34.2004],"贵阳":[106.6992,26.7682],"连云港":[119.1248,34.552],"邢台":[114.8071,37.2821],"邯郸":[114.4775,36.535],"郑州":[113.4668,34.6234],"鄂尔多斯":[108.9734,39.2487],"重庆":[107.7539,30.1904],"金华":[120.0037,29.1028],"铜川":[109.0393,35.1947],"银川":[106.3586,38.1775],"镇江":[119.4763,31.9702],"长春":[125.8154,44.2584],"长沙":[113.0823,28.2568],"长治":[112.8625,36.4746],"阳泉":[113.4778,38.0951],"青岛":[120.4651,36.3373],"韶关":[113.7964,24.7028]},"markLine":{"data":[[{"name":"北京"},{"name":"包头"}],[{"name":"北京"},{"name":"北海"}],[{"name":"北京"},{"name":"广州"}],[{"name":"北京"},{"name":"郑州"}],[{"name":"北京"},{"name":"长春"}],[{"name":"北京"},{"name":"长治"}],[{"name":"北京"},{"name":"重庆"}],[{"name":"北京"},{"name":"长沙"}],[{"name":"北京"},{"name":"成都"}],[{"name":"北京"},{"name":"常州"}],[{"name":"北京"},{"name":"丹东"}],[{"name":"北京"},{"name":"大连"}],[{"name":"北京"},{"name":"东营"}],[{"name":"北京"},{"name":"延安"}],[{"name":"北京"},{"name":"福州"}],[{"name":"北京"},{"name":"海口"}],[{"name":"北京"},{"name":"呼和浩特"}],[{"name":"北京"},{"name":"合肥"}],[{"name":"北京"},{"name":"杭州"}],[{"name":"北京"},{"name":"哈尔滨"}],[{"name":"北京"},{"name":"舟山"}],[{"name":"北京"},{"name":"银川"}],[{"name":"北京"},{"name":"衢州"}],[{"name":"北京"},{"name":"南昌"}],[{"name":"北京"},{"name":"昆明"}],[{"name":"北京"},{"name":"贵阳"}],[{"name":"北京"},{"name":"兰州"}],[{"name":"北京"},{"name":"拉萨"}],[{"name":"北京"},{"name":"连云港"}],[{"name":"北京"},{"name":"临沂"}],[{"name":"北京"},{"name":"柳州"}],[{"name":"北京"},{"name":"宁波"}],[{"name":"北京"},{"name":"南京"}],[{"name":"北京"},{"name":"南宁"}],[{"name":"北京"},{"name":"南通"}],[{"name":"北京"},{"name":"上海"}],[{"name":"北京"},{"name":"沈阳"}],[{"name":"北京"},{"name":"西安"}],[{"name":"北京"},{"name":"汕头"}],[{"name":"北京"},{"name":"深圳"}],[{"name":"北京"},{"name":"青岛"}],[{"name":"北京"},{"name":"济南"}],[{"name":"北京"},{"name":"太原"}],[{"name":"北京"},{"name":"乌鲁木齐"}],[{"name":"北京"},{"name":"潍坊"}],[{"name":"北京"},{"name":"威海"}],[{"name":"北京"},{"name":"温州"}],[{"name":"北京"},{"name":"武汉"}],[{"name":"北京"},{"name":"无锡"}],[{"name":"北京"},{"name":"厦门"}],[{"name":"北京"},{"name":"西宁"}],[{"name":"北京"},{"name":"徐州"}],[{"name":"北京"},{"name":"烟台"}],[{"name":"北京"},{"name":"盐城"}],[{"name":"北京"},{"name":"珠海"}],[{"name":"上海"},{"name":"包头"}],[{"name":"上海"},{"name":"北海"}],[{"name":"上海"},{"name":"广州"}],[{"name":"上海"},{"name":"郑州"}],[{"name":"上海"},{"name":"长春"}],[{"name":"上海"},{"name":"重庆"}],[{"name":"上海"},{"name":"长沙"}],[{"name":"上海"},{"name":"成都"}],[{"name":"上海"},{"name":"丹东"}],[{"name":"上海"},{"name":"大连"}],[{"name":"上海"},{"name":"福州"}],[{"name":"上海"},{"name":"海口"}],[{"name":"上海"},{"name":"呼和浩特"}],[{"name":"上海"},{"name":"合肥"}],[{"name":"上海"},{"name":"哈尔滨"}],[{"name":"上海"},{"name":"舟山"}],[{"name":"上海"},{"name":"银川"}],[{"name":"上海"},{"name":"南昌"}],[{"name":"上海"},{"name":"昆明"}],[{"name":"上海"},{"name":"贵阳"}],[{"name":"上海"},{"name":"兰州"}],[{"name":"上海"},{"name":"拉萨"}],[{"name":"上海"},{"name":"连云港"}],[{"name":"上海"},{"name":"临沂"}],[{"name":"上海"},{"name":"柳州"}],[{"name":"上海"},{"name":"宁波"}],[{"name":"上海"},{"name":"南宁"}],[{"name":"上海"},{"name":"北京"}],[{"name":"上海"},{"name":"沈阳"}],[{"name":"上海"},{"name":"秦皇岛"}],[{"name":"上海"},{"name":"西安"}],[{"name":"上海"},{"name":"石家庄"}],[{"name":"上海"},{"name":"汕头"}],[{"name":"上海"},{"name":"深圳"}],[{"name":"上海"},{"name":"青岛"}],[{"name":"上海"},{"name":"济南"}],[{"name":"上海"},{"name":"天津"}],[{"name":"上海"},{"name":"太原"}],[{"name":"上海"},{"name":"乌鲁木齐"}],[{"name":"上海"},{"name":"潍坊"}],[{"name":"上海"},{"name":"威海"}],[{"name":"上海"},{"name":"温州"}],[{"name":"上海"},{"name":"武汉"}],[{"name":"上海"},{"name":"厦门"}],[{"name":"上海"},{"name":"西宁"}],[{"name":"上海"},{"name":"徐州"}],[{"name":"上海"},{"name":"烟台"}],[{"name":"上海"},{"name":"珠海"}],[{"name":"广州"},{"name":"北海"}],[{"name":"广州"},{"name":"郑州"}],[{"name":"广州"},{"name":"长春"}],[{"name":"广州"},{"name":"重庆"}],[{"name":"广州"},{"name":"长沙"}],[{"name":"广州"},{"name":"成都"}],[{"name":"广州"},{"name":"常州"}],[{"name":"广州"},{"name":"大连"}],[{"name":"广州"},{"name":"福州"}],[{"name":"广州"},{"name":"海口"}],[{"name":"广州"},{"name":"呼和浩特"}],[{"name":"广州"},{"name":"合肥"}],[{"name":"广州"},{"name":"杭州"}],[{"name":"广州"},{"name":"哈尔滨"}],[{"name":"广州"},{"name":"舟山"}],[{"name":"广州"},{"name":"银川"}],[{"name":"广州"},{"name":"南昌"}],[{"name":"广州"},{"name":"昆明"}],[{"name":"广州"},{"name":"贵阳"}],[{"name":"广州"},{"name":"兰州"}],[{"name":"广州"},{"name":"拉萨"}],[{"name":"广州"},{"name":"连云港"}],[{"name":"广州"},{"name":"临沂"}],[{"name":"广州"},{"name":"柳州"}],[{"name":"广州"},{"name":"宁波"}],[{"name":"广州"},{"name":"南京"}],[{"name":"广州"},{"name":"南宁"}],[{"name":"广州"},{"name":"南通"}],[{"name":"广州"},{"name":"北京"}],[{"name":"广州"},{"name":"上海"}],[{"name":"广州"},{"name":"沈阳"}],[{"name":"广州"},{"name":"西安"}],[{"name":"广州"},{"name":"石家庄"}],[{"name":"广州"},{"name":"汕头"}],[{"name":"广州"},{"name":"青岛"}],[{"name":"广州"},{"name":"济南"}],[{"name":"广州"},{"name":"天津"}],[{"name":"广州"},{"name":"太原"}],[{"name":"广州"},{"name":"乌鲁木齐"}],[{"name":"广州"},{"name":"温州"}],[{"name":"广州"},{"name":"武汉"}],[{"name":"广州"},{"name":"无锡"}],[{"name":"广州"},{"name":"厦门"}],[{"name":"广州"},{"name":"西宁"}],[{"name":"广州"},{"name":"徐州"}],[{"name":"广州"},{"name":"烟台"}],[{"name":"广州"},{"name":"盐城"}]],"clickable":true,"symbol":["none","circle"],"smooth":true,"symbolSize":1,"large":false,"effect":{"show":false},"smoothness":0.2,"precision":2,"bundling":{"enable":false,"maxTurningAngle":45},"itemStyle":{"normal":{"color":"#fff","borderWidth":1,"borderColor":"rgba(30,144,255,0.5)"}}},"hoverable":false},{"name":"北京Top10","type":"map","data":[["-"]],"markLine":{"data":[[{"name":"北京","value":95},{"name":"上海"}],[{"name":"北京","value":90},{"name":"广州"}],[{"name":"北京","value":80},{"name":"大连"}],[{"name":"北京","value":70},{"name":"南宁"}],[{"name":"北京","value":60},{"name":"南昌"}],[{"name":"北京","value":50},{"name":"拉萨"}],[{"name":"北京","value":40},{"name":"长春"}],[{"name":"北京","value":30},{"name":"包头"}],[{"name":"北京","value":20},{"name":"重庆"}],[{"name":"北京","value":10},{"name":"常州"}]],"clickable":true,"symbol":["circle","arrow"],"smooth":true,"symbolSize":[2,4],"large":false,"effect":{"show":true,"scaleSize":1,"period":30,"color":"#fff","shadowBlur":10},"smoothness":0.2,"precision":2,"bundling":{"enable":false,"maxTurningAngle":45},"itemStyle":{"normal":{"borderWidth":1,"lineStyle":{"type":"solid","shadowBlur":10}}}},"mapType":"china","markPoint":{"data":[{"name":"上海","value":95},{"name":"广州","value":90},{"name":"大连","value":80},{"name":"南宁","value":70},{"name":"南昌","value":60},{"name":"拉萨","value":50},{"name":"长春","value":40},{"name":"包头","value":30},{"name":"重庆","value":20},{"name":"常州","value":10}],"clickable":true,"symbol":"pin","symbolSize":"function (v) {return 10+v/10;}","large":false,"effect":{"show":true}}},{"name":"上海Top10","type":"map","data":[["-"]],"markLine":{"data":[[{"name":"上海","value":95},{"name":"包头"}],[{"name":"上海","value":90},{"name":"昆明"}],[{"name":"上海","value":80},{"name":"广州"}],[{"name":"上海","value":70},{"name":"郑州"}],[{"name":"上海","value":60},{"name":"长春"}],[{"name":"上海","value":50},{"name":"重庆"}],[{"name":"上海","value":40},{"name":"长沙"}],[{"name":"上海","value":30},{"name":"北京"}],[{"name":"上海","value":20},{"name":"丹东"}],[{"name":"上海","value":10},{"name":"大连"}]],"clickable":true,"symbol":["circle","arrow"],"smooth":true,"symbolSize":[2,4],"large":false,"effect":{"show":true,"scaleSize":1,"period":30,"color":"#fff","shadowBlur":10},"smoothness":0.2,"precision":2,"bundling":{"enable":false,"maxTurningAngle":45},"itemStyle":{"normal":{"borderWidth":1,"lineStyle":{"type":"solid","shadowBlur":10}}}},"mapType":"china","markPoint":{"data":[{"name":"包头","value":95},{"name":"昆明","value":90},{"name":"广州","value":80},{"name":"郑州","value":70},{"name":"长春","value":60},{"name":"重庆","value":50},{"name":"长沙","value":40},{"name":"北京","value":30},{"name":"丹东","value":20},{"name":"大连","value":10}],"clickable":true,"symbol":"pin","symbolSize":"function (v) {return 10+v/10;}","large":false,"effect":{"show":true}}},{"name":"广州Top10","type":"map","data":[["-"]],"markLine":{"data":[[{"name":"广州","value":95},{"name":"福州"}],[{"name":"广州","value":90},{"name":"太原"}],[{"name":"广州","value":80},{"name":"长春"}],[{"name":"广州","value":70},{"name":"重庆"}],[{"name":"广州","value":60},{"name":"西安"}],[{"name":"广州","value":50},{"name":"成都"}],[{"name":"广州","value":40},{"name":"常州"}],[{"name":"广州","value":30},{"name":"北京"}],[{"name":"广州","value":20},{"name":"北海"}],[{"name":"广州","value":10},{"name":"海口"}]],"clickable":true,"symbol":["circle","arrow"],"smooth":true,"symbolSize":[2,4],"large":false,"effect":{"show":true,"scaleSize":1,"period":30,"color":"#fff","shadowBlur":10},"smoothness":0.2,"precision":2,"bundling":{"enable":false,"maxTurningAngle":45},"itemStyle":{"normal":{"borderWidth":1,"lineStyle":{"type":"solid","shadowBlur":10}}}},"mapType":"china","markPoint":{"data":[{"name":"福州","value":95},{"name":"太原","value":90},{"name":"长春","value":80},{"name":"重庆","value":70},{"name":"西安","value":60},{"name":"成都","value":50},{"name":"常州","value":40},{"name":"北京","value":30},{"name":"北海","value":20},{"name":"海口","value":10}],"clickable":true,"symbol":"pin","symbolSize":"function (v) {return 10+v/10;}","large":false,"effect":{"show":true}}}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"center","orient":"vertical"},"legend":{"show":true,"data":["北京Top10","上海Top10","广州Top10"],"x":"left","y":"top","orient":"vertical","selected":{"北京Top10":false,"广州Top10":false},"selectedMode":"single","textStyle":{"color":"#fff"}},"dataRange":{"show":true,"calculable":true,"itemWidth":6,"selectedMode":true,"x":"left","y":"bottom","orient":"vertical","color":["#ff3333","orange","yellow","limegreen","aquamarine"],"borderColor":"#ccc","borderWidth":0,"min":0,"max":100},"color":["#FFD700","#7FFFD4","#32CD32",null],"backgroundColor":"#1b1b1b","title":{"text":"Baidu Migration","subtext":"Fictious Data","x":"center","y":"top","orient":"horizontal","textStyle":{"color":"white"}}},"evals":["series.1.markPoint.symbolSize","series.2.markPoint.symbolSize","series.3.markPoint.symbolSize"],"jsHooks":[]}</script>
</div>
<div id="addoveride-heatmap" class="section level2">
<h2><span class="header-section-number">4.5</span> Add/Overide heatMap</h2>
<p>Let’s make up a fictious heatmap dataset. The dataset must be comprised of <code>lng</code>, <code>lat</code> and <code>heat value</code>.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">heatmap &lt;-<span class="st"> </span><span class="kw">sapply</span>(<span class="dv">1</span>:<span class="dv">15</span>, function(i){
    x &lt;-<span class="st"> </span><span class="dv">100</span> +<span class="st"> </span><span class="kw">runif</span>(<span class="dv">1</span>, <span class="dv">0</span>, <span class="dv">1</span>) *<span class="st"> </span><span class="dv">16</span>
    y &lt;-<span class="st"> </span><span class="dv">24</span> +<span class="st"> </span><span class="kw">runif</span>(<span class="dv">1</span>, <span class="dv">0</span>, <span class="dv">1</span>) *<span class="st"> </span><span class="dv">12</span>
    <span class="kw">lapply</span>(<span class="dv">0</span>:<span class="kw">floor</span>(<span class="dv">50</span> *<span class="st"> </span><span class="kw">abs</span>(<span class="kw">rnorm</span>(<span class="dv">1</span>))), function(j){
        <span class="kw">c</span>(x+<span class="kw">runif</span>(<span class="dv">1</span>, <span class="dv">0</span>, <span class="dv">1</span>)*<span class="dv">2</span>, y+<span class="kw">runif</span>(<span class="dv">1</span>, <span class="dv">0</span>, <span class="dv">1</span>)*<span class="dv">2</span>, <span class="kw">runif</span>(<span class="dv">1</span>, <span class="dv">0</span>, <span class="dv">1</span>))
    })
})
heatmap &lt;-<span class="st"> </span><span class="kw">data.frame</span>(<span class="kw">matrix</span>(<span class="kw">unlist</span>(heatmap), <span class="dt">byrow=</span><span class="ot">TRUE</span>, <span class="dt">ncol=</span><span class="dv">3</span>))
<span class="kw">str</span>(heatmap)</code></pre></div>
<pre><code>## &#39;data.frame&#39;:    827 obs. of  3 variables:
##  $ X1: num  113 114 113 114 115 ...
##  $ X2: num  29.6 30.8 30 30.1 29.6 ...
##  $ X3: num  0.56539 0.60349 0.44539 0.00643 0.71194 ...</code></pre>
<p>Then append/modify the heatmap to a base map using <code>addHeatmap</code> / <code>overideHeatmap</code>.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">echartr</span>(<span class="ot">NULL</span>, <span class="dt">type=</span><span class="st">&quot;map_china&quot;</span>) %&gt;%<span class="st"> </span><span class="kw">addHeatmap</span>(<span class="dt">data=</span>heatmap)</code></pre></div>
<div id="htmlwidget-9d3948498103ae606f07" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-9d3948498103ae606f07">{"x":{"series":[{"type":"map","mapType":"china","itemStyle":{"normal":{"label":{"show":false}},"emphasis":{"label":{"show":true}}},"data":[],"heatmap":{"data":[[113.082099625375,29.6270281691104,0.565392619231716],[114.247293256689,30.8417381797917,0.603493501665071],[113.040877831168,29.9664695695974,0.44539271784015],[113.968294410966,30.1348022767343,0.00643292861059308],[114.532180029433,29.5828249645419,0.71194355096668],[113.189557737205,30.3007743097842,0.0303644281812012],[112.7406554115,30.1966158729047,0.518886118894443],[113.546664740425,30.1443859087303,0.366752607515082],[114.430596309714,30.7989896209911,0.859509902773425],[112.765705933794,30.816311399918,0.0649514552205801],[112.944201502018,29.4204074717127,0.164784356020391],[114.64289640775,30.3630739920773,0.910440476145595],[114.171755372081,30.4478594181128,0.319444246590137],[114.295993943233,30.6262125866488,0.404889570083469],[113.129096601158,30.1082173511386,0.27139728050679],[112.802658300381,30.1647049859166,0.439799218205735],[112.910651234444,29.8820534385741,0.0177631378173828],[112.760803111829,30.7835942907259,0.11074337689206],[114.189400677569,29.8951352601871,0.375954712508246],[113.192582006566,30.4761019521393,0.419885593932122],[113.544895232655,29.6166879944503,0.141153720207512],[113.989754991606,29.9373967796564,0.0930136321112514],[114.004816887435,30.2278967602178,0.129706267034635],[113.194416356739,31.0601386418566,0.0667007942683995],[113.884127073456,30.1037876689807,0.720897796098143],[114.092920584138,31.1732973507605,0.414339703740552],[114.253642803058,31.3282552142628,0.9402729885187],[114.013333086856,29.5738194719888,0.0839809249155223],[114.19193479605,29.7439474896528,0.216286796377972],[113.11640145164,30.8649371140637,0.698378115193918],[113.899417155422,29.9778965227306,0.173192170681432],[114.211434358265,30.4907240536995,0.978716821875423],[112.781566367485,30.8173875347711,0.477438909001648],[113.785423120484,29.6045514033176,0.843220848124474],[108.287964404561,25.582666547969,0.446182089857757],[107.417037921492,25.9286547107622,0.782887659734115],[107.101536352653,25.9942306410521,0.892960825935006],[107.008494554088,24.9949489990249,0.251910836901516],[107.460420810618,25.9368725125678,0.661165160359815],[108.800123813096,25.7902792934328,0.662441761232913],[108.489431128837,24.4621336408891,0.660222650272772],[107.358532255981,24.3884078441188,0.317537220194936],[108.470397960395,24.365533770062,0.0124484549742192],[108.37791772699,25.9786558132619,0.725012810202315],[107.110601337161,25.5055625420064,0.925644042436033],[107.898068799637,25.8670763429254,0.440247175516561],[108.405973549932,24.4445721935481,0.0349723543040454],[107.806374360807,26.1965131959878,0.0428117311093956],[107.008185280953,26.0202368078753,0.261487089795992],[108.68781934632,25.4955921308137,0.472842457471415],[108.780831934884,25.3738210881129,0.184880761662498],[108.659655988682,24.662678388413,0.12838579970412],[107.32953689713,25.5331277055666,0.401414067484438],[107.89746291237,24.574070872739,0.020843441830948],[106.880937033333,24.6755834203213,0.270307139493525],[108.736719397362,24.859963462688,0.109919114504009],[108.783943061717,25.8866988439113,0.374457243131474],[108.296296940651,24.9889101390727,0.886879807338119],[108.734315530397,25.1372865648009,0.863698986824602],[108.297055976,26.0355709446594,0.692255105823278],[107.802338011563,25.5068415319547,0.582545063924044],[107.114844529424,24.8821593057364,0.664734725374728],[106.811774133239,25.8222496658564,0.879200076218694],[107.390284416731,25.0554225207306,0.134844843065366],[107.137734447606,25.8540381439961,0.598094712710008],[107.025089419447,26.0674938405864,0.156857149442658],[106.981132922694,25.0403189952485,0.0409310706891119],[107.022118187509,25.4975761785172,0.142902972642332],[108.011760369875,24.8672974407673,0.854745260206982],[108.135000900365,24.3366377423517,0.186749211745337],[107.11200525146,25.1684591984376,0.977527813054621],[108.764799529687,24.9623311688192,0.852096272399649],[107.050637397915,24.7018495816737,0.283481503836811],[106.840888065286,24.7044513286091,0.308650796534494],[108.240344215184,25.1564356479794,0.717797243734822],[107.401173839346,26.0840804274194,0.0104039602447301],[107.330027819611,25.541255232878,0.838535299059004],[108.680860581808,24.8119885865599,0.165676212636754],[107.969581972808,25.2188501642086,0.200384555384517],[108.091746827122,25.4852399430238,0.285567576996982],[108.308325632475,24.7038760790601,0.409971715882421],[108.141503678635,25.9286120128818,0.861054048174992],[108.601025576703,25.139469595626,0.489440891193226],[108.600231344812,24.8457705345936,0.874623409472406],[107.930683382321,26.1877655615099,0.531300550093874],[107.801462725736,25.3438831791282,0.0133085402194411],[108.495607413817,25.9069490833208,0.684641043888405],[107.029527646489,25.9658263060264,0.367157414322719],[106.949081652332,25.9415957177989,0.657879255712032],[107.180147872306,24.6152381580323,0.791259113233536],[107.486795820296,25.7062623151578,0.730876072775573],[107.875322602224,26.1093378770165,0.658117057057098],[108.454526644666,24.3293220382184,0.905993284890428],[108.667057022452,30.5189331187867,0.852574428543448],[109.040327247232,31.1082155406475,0.605416256003082],[108.586794130504,30.2087899986655,0.784073593094945],[107.580162114464,30.8280146932229,0.794961663661525],[108.29382033227,30.40823293617,0.0571839099284261],[108.870956736617,30.878031973727,0.167405975749716],[107.60325328121,30.810209587682,0.774467265466228],[109.322617716156,31.0300888498314,0.940121492138132],[108.259917096701,29.6924231508747,0.00614587683230639],[109.056028731633,30.1649238341488,0.468567553674802],[108.849350639153,31.570643665269,0.0446713492274284],[108.698665682692,29.8826386048459,0.794439070625231],[107.808508301619,31.0221235868521,0.743689162191004],[109.001866227947,30.5644072764553,0.195541156921536],[108.934652871452,31.2356911911629,0.827285525621846],[108.84164254507,31.647665459197,0.0368091829586774],[109.235468238126,31.3447503661737,0.373708449536934],[108.729557747953,29.7354484624229,0.362703677732497],[109.428318618797,30.7720807902515,0.267894823802635],[109.22089269571,30.8597359927371,0.572587413713336],[108.602097189985,30.7259644330479,0.819859279086813],[108.006916990969,29.8281034408137,0.639589784899727],[109.039037853479,30.2923082169145,0.778917358024046],[108.653078336269,29.9731598263606,0.00311630195938051],[107.789280202705,31.4372083432972,0.946381256449968],[109.407598567661,31.49673620658,0.779060312081128],[109.327136184089,30.2256939560175,0.476507456740364],[109.033166778274,30.3804655410349,0.480003392091021],[108.356357919518,30.8240082105622,0.840468210633844],[109.046317637898,31.1480477172881,0.174147352809086],[108.323185960297,30.1864846437238,0.756028332747519],[107.840678066015,30.724979469087,0.865819742437452],[108.703539794311,30.2394682080485,0.594366793520749],[108.092629608698,30.9854566790164,0.407354551600292],[108.170025376137,31.5549724372104,0.731005981098861],[108.391586697195,30.0915163522586,0.10505002271384],[109.25754456548,30.5461987019517,0.834948330884799],[108.358452570625,30.5507045416161,0.955187927233055],[108.954915430862,31.3652019812725,0.207801562268287],[108.753806327935,30.4017597045749,0.18589125899598],[108.791284517385,29.9396007270552,0.694087820127606],[107.993090188131,31.0650494433939,0.780997692374513],[108.395705997478,31.398645258043,0.177305815042928],[107.694840865675,31.0252226265147,0.442259011324495],[109.384328033775,30.6262460690923,0.536336764227599],[109.388465742581,31.3321750555187,0.452817138284445],[108.900709442329,30.3730871472508,0.112814416177571],[108.149830084294,31.1454372419976,0.0781435710377991],[109.21999099385,30.3236796376295,0.647266647778451],[108.743438093457,30.2607307583094,0.78681894694455],[109.094161488581,30.5285109165125,0.259252605261281],[107.990087931044,29.9008093187585,0.783645752351731],[108.479616631754,29.8836291604675,0.705285785486922],[108.460351816844,30.8463118849322,0.3433934727218],[108.09028075682,30.1523948870599,0.0702639219816774],[107.530280064791,30.6933862939477,0.241992529481649],[108.399704001844,30.6651943102479,0.265300229424611],[109.061443661805,31.5117173707113,0.477165081072599],[109.06283893669,30.1132718659937,0.348054226487875],[108.402310021687,30.2277309889905,0.257792120333761],[107.601752706803,30.7506112838164,0.0692189605906606],[108.439159507398,30.0128767481074,0.222387601388618],[108.57393509848,30.1762383435853,0.22145891119726],[107.824721032288,30.1290909582749,0.0105854258872569],[109.380129132885,30.4663070850074,0.189500282984227],[107.597086895257,30.2170198466629,0.884292087750509],[107.539535207208,31.5378427170217,0.90208041598089],[108.220041200984,30.2398435506038,0.291495490353554],[107.537216248922,30.7540818531998,0.0286486058030277],[109.297192114405,30.9202514691278,0.958442865405232],[109.141867945436,31.6348386514001,0.103767967550084],[109.154017070308,30.3142518778332,0.21513826563023],[109.208565261681,31.1943100406788,0.683678233064711],[107.6562373247,30.4187469338067,0.965597805799916],[107.940650677774,30.0865868688561,0.762087988900021],[107.825112720486,30.3033347995952,0.0968831435311586],[108.700595556293,31.1203239401802,0.121191418264061],[109.275861261413,30.1591016682796,0.5778193178121],[109.000476420391,30.1802263814025,0.151759774656966],[109.476819945034,31.3198314732872,0.198528594337404],[109.061143219471,31.2007882716134,0.522012840723619],[108.23648075806,31.6334252958186,0.887371738208458],[108.405102570076,31.180255215615,0.837007063208148],[107.931567505933,30.6312955580652,0.885605328017846],[108.876230725553,30.6025178185664,0.297445924021304],[108.90459953621,31.5199412032962,0.547303326893598],[108.756317621563,31.0793849658221,0.934593763202429],[108.091997690499,31.0402114903554,0.522006920306012],[108.954191611148,31.2998175751418,0.21151330252178],[107.516515550204,31.2344432831742,0.952556147472933],[106.831354171503,33.3709997250699,0.309336228528991],[106.50860673422,33.7750693755224,0.0933858149219304],[106.924864510074,33.4134222026914,0.936080697458237],[108.453243763652,33.9207639009692,0.934686863794923],[108.203557177912,34.6796817206778,0.425291139399633],[108.457086385693,35.0926792770624,0.471806288696826],[107.929045245517,34.479672387708,0.8906591006089],[107.362932179123,34.5500522446819,0.422127211699262],[107.865831154399,34.4160392424092,0.162912733852863],[107.931729271077,34.939604645595,0.68951629800722],[108.350533049088,33.3554869396612,0.593799140769988],[107.429121818393,34.3994989315979,0.916606322396547],[106.727163399104,33.8575795404613,0.984530523652211],[107.464057823643,34.820599117782,0.717402450041845],[106.534093940631,35.1082751485519,0.420693618943915],[108.223403648473,33.9820555155165,0.390421860618517],[107.899061361328,34.7131043295376,0.342756547033787],[106.961203549989,34.6187250986695,0.0544112306088209],[108.051241660491,34.3172260685824,0.841678880853578],[107.415731683839,33.5909143965691,0.10142444842495],[107.667331542354,34.0176357990131,0.332720303209499],[107.273628375959,33.6212420561351,0.583716599736363],[107.138697485905,35.1173803140409,0.867013596231118],[106.506115512457,34.5581568405032,0.686702278675511],[106.856436894741,34.2677221042104,0.128414320060983],[107.826748830732,34.7819408820942,0.811056907754391],[106.666390200146,33.4579687071964,0.566724271280691],[107.617690082639,34.065883894451,0.499514629133046],[108.07364998199,34.4193786703981,0.745465222513303],[106.757617832161,34.2086684391834,0.025662875501439],[107.65461058775,34.0822592517361,0.26801365124993],[106.616209090687,35.1362153892405,0.735323059838265],[108.37667941628,33.6830510399304,0.246247395640239],[108.023716298398,33.7340642800555,0.115569212241098],[108.303186052479,35.1744564333931,0.868521803524345],[106.954674857669,33.4491728250869,0.757626282749698],[107.932361685671,33.80826313328,0.497342880815268],[107.492648572661,34.6478321463801,0.18391762720421],[108.127006055322,34.7298027458601,0.248514962615445],[108.442469142377,35.0663562049158,0.462829394033179],[107.336298706476,34.9976686919108,0.527414406649768],[107.148966844659,34.3941472228616,0.523836614331231],[108.327966509853,35.1801392920315,0.396109357010573],[107.992214022204,34.7402279870585,0.639032088685781],[108.42756435601,34.1452431767248,0.368651681579649],[107.859375820495,34.7304929578677,0.740121303359047],[107.567244973034,33.8820409048349,0.707019411958754],[106.780360010918,34.7333056926727,0.146879393374547],[108.441390009597,33.4229199690744,0.650617983192205],[107.556370064151,33.8810522169806,0.46003596461378],[106.782616670709,33.7807590696029,0.131252542836592],[108.336718983017,35.1030863025226,0.882989172590896],[107.919330593664,34.5816108020954,0.866148489061743],[106.620791985653,33.5686334674247,0.992623301455751],[107.673705806956,33.7916409648024,0.256386651890352],[108.316243269946,34.7496621706523,0.795195719692856],[107.1345440601,34.3621476395056,0.652688603149727],[106.896110785659,35.2622403493151,0.364188096486032],[107.098522220273,33.6605824809521,0.23920459789224],[107.718241540249,33.8677870030515,0.49147424986586],[107.680707130581,34.5788049707189,0.577318746130913],[107.350669428241,33.4720819601789,0.162251263624057],[108.407512636855,34.4198917015456,0.276824891101569],[107.441986173857,34.4119574897923,0.531900292728096],[106.595736042596,34.2650409443304,0.246608165791258],[106.753981077112,34.0445294519886,0.322914787335321],[107.517376230098,35.1696917279623,0.465755467303097],[108.466184544843,33.9828768288717,0.0165680760983378],[107.321873289533,35.2442705798894,0.928413544315845],[107.295510695316,35.0997356316075,0.68072159984149],[108.369325100444,34.5631469986401,0.0650282963179052],[107.720416306984,34.4711595023982,0.429690691409633],[107.925756513141,34.6626696833409,0.702602593693882],[107.704741001129,34.8812307920307,0.565087621333078],[106.90762202628,33.8491500420496,0.00164096127264202],[108.119957472198,35.1464530332014,0.179666921962053],[107.859098229092,33.4359722845256,0.303874358301982],[106.532644465566,33.8658175477758,0.0212660147808492],[107.487032573204,34.458419885952,0.602546254172921],[107.009889505338,34.0860466621816,0.525948949158192],[106.705333462451,35.2447908585891,0.877994464011863],[108.272970677353,33.9764314689673,0.0407028896734118],[107.056916100904,34.6604982474819,0.475356145296246],[108.403678429779,34.1049034269527,0.648888304363936],[107.722373719793,33.6512612258084,0.402237222995609],[108.481722692028,35.1852999744006,0.769709286279976],[107.806142678484,34.6673634680919,0.556552298599854],[107.898090962786,34.7698367969133,0.0685606342740357],[108.113243613392,35.0662195011973,0.0403143228031695],[107.661150064319,33.4993796469644,0.102254433324561],[107.182997217868,34.4994150116108,0.761438431916758],[107.683510405943,33.7252519284375,0.620868031401187],[108.133465692867,33.8117388319224,0.113754022866488],[106.887665049173,34.0667439470999,0.444258931558579],[106.695337869693,33.8867681561969,0.936618238920346],[106.823382006492,35.0818434832618,0.372529374901205],[107.699979626108,33.9989279718138,0.548224004684016],[107.282263599802,33.5531919868663,0.723105297423899],[107.925570958294,34.9032796123065,0.118801079457626],[107.330477568787,35.2697027940303,0.38065392151475],[108.164890082087,34.1062242318876,0.751299571478739],[107.659935973585,34.3168679215014,0.509689147118479],[108.413860793225,35.218514570035,0.309442048193887],[108.420927061699,35.2980769909918,0.353877328103408],[107.719222982414,33.8884229999967,0.690347956260666],[106.891767074354,34.0504739638418,0.95454184547998],[107.235552626196,33.7856924654916,0.927359628956765],[107.398356748745,33.9959928118624,0.503247058484703],[107.095913330559,33.6152316685766,0.66357749979943],[106.996480667498,35.074034825433,0.682647785404697],[107.583862601779,34.743580036331,0.157313611591235],[107.866996445693,33.3711186340079,0.712480122456327],[107.451893332414,33.8177044871263,0.190795421600342],[107.348136266228,35.2951765824109,0.794507289305329],[108.19729954144,33.314501627814,0.261558410478756],[107.303311222233,35.138688235078,0.415772030130029],[108.461219996214,35.2071379814297,0.640123126329854],[107.182120108046,34.1380954263732,0.277187108527869],[106.532778146211,34.7821354493499,0.982702218228951],[107.301126864739,34.346967171412,0.491662467364222],[107.344532021321,34.1543895606883,0.339684096165001],[106.720412575174,33.6060212720186,0.340191897936165],[106.800054952968,34.753634874709,0.356677462114021],[107.619753082283,34.3836620068178,0.31001173844561],[108.448085144162,34.2062313398346,0.351371630560607],[107.947603598237,35.2517683557235,0.4504755793605],[107.0917062792,34.3829524549656,0.852044257801026],[106.908411443233,34.4628228843212,0.411295631201938],[107.624143445399,34.9615352484398,0.491185983642936],[108.05235110689,34.6469379095361,0.405981932766736],[107.337786395568,34.1924685733393,0.935012034606189],[108.096463145223,34.0892097391188,0.680392468580976],[106.957069862634,33.9684462225996,0.34841944440268],[108.356323810294,34.9228066606447,0.596539227059111],[106.558756061364,34.0843070601113,0.632842495338991],[108.489063852001,33.9989826413803,0.488114115782082],[107.192923292052,34.3988053230569,0.992571246810257],[108.010422877502,33.3681926140562,0.395704477094114],[108.007957194932,34.5321606295183,0.783506288193166],[106.751416594256,34.8698056372814,0.433373687788844],[106.523276419844,35.0844662436284,0.117841632803902],[108.39237483684,34.4304094701074,0.933486197376624],[108.334331443999,33.3759426204488,0.394166870974004],[107.506767206825,33.7825453155674,0.329592758789659],[107.750354203861,34.5647128759883,0.845376315992326],[106.562122709118,34.1559930397198,0.00134660466574132],[108.083890147042,34.6777297495864,0.472310533747077],[107.218793066684,34.4904683353379,0.0416671021375805],[107.154972847085,33.7514910590835,0.237604369409382],[107.869492384139,33.8373906090856,0.994427458383143],[106.822041893844,34.7537844325416,0.732920984504744],[107.098770960234,33.8501037433743,0.220505605218932],[108.478869045619,33.7154025360942,0.354327141540125],[106.913340133615,35.096709697973,0.930109997978434],[107.887932006735,33.8373023211025,0.704758170992136],[106.499665006064,33.8229740168899,0.302627576515079],[108.358212202322,34.260059659835,0.958507966250181],[107.154250089545,34.6061783414334,0.193629699992016],[107.682806550059,34.9234855081886,0.480048113036901],[108.166494660079,35.2408942412585,0.901450146688148],[114.592361958232,35.2460769824684,0.332468629581854],[115.681053882465,35.1189519036561,0.384291946189478],[115.950031303335,36.9056897987612,0.0382457096129656],[114.941734339576,36.6875605825335,0.801802545087412],[114.538052269258,36.0431499090046,0.1475949594751],[114.916570969857,36.1764834676869,0.913766146404669],[114.381920735817,35.3536142357625,0.829453926766291],[114.276989511214,36.9674602262676,0.839695892995223],[114.166473988444,35.4097590805031,0.19656699243933],[115.864245552104,35.2024859231897,0.22984871850349],[115.111866576597,35.7936019171029,0.663160411873832],[114.966273271013,35.9553517345339,0.186775268288329],[114.171193571761,36.0601604892872,0.457181042060256],[115.053206121549,36.1229204563424,0.483692075824365],[115.697524798568,36.4212359245867,0.170206634793431],[115.568976210896,35.2579372283071,0.97934123291634],[115.216123233549,35.8725766926073,0.780842140084133],[115.053361233789,36.3542090151459,0.152829668251798],[116.07235464314,35.2055156785063,0.434730598935857],[114.196914997417,35.0897431983612,0.621950046392158],[115.44968575798,35.0179023765959,0.693051305133849],[115.571044737007,35.5665457528085,0.539585615741089],[116.029868606944,35.8110070964321,0.657215886982158],[115.501316267997,35.7589224972762,0.0439061473589391],[114.876662909985,36.5131405214779,0.900175618939102],[115.789649094921,35.960925729014,0.894638563506305],[115.562070312444,36.2534419936128,0.328619884327054],[115.007981402334,36.6512343012728,0.699041982647032],[115.553826046642,36.3132824194618,0.964659722987562],[115.382493743673,35.0505677489564,0.961488866014406],[115.995377590414,35.1806030892767,0.670272311894223],[114.681827562861,36.4427362112328,0.662182149477303],[115.378974003252,36.2253485866822,0.862636628327891],[115.235268543009,36.1545381518081,0.414188074413687],[114.12781417137,35.8633792526089,0.988505334360525],[116.081151835155,36.5110422871076,0.964823879534379],[114.261521236505,36.3443591832183,0.902943508233875],[114.707271001302,36.1292420285754,0.998072883114219],[114.188292496838,35.7930908566341,0.856844149995595],[114.47158327559,35.996054881718,0.794298107502982],[114.802487675566,35.6561696408316,0.602470322977751],[114.828169606626,35.5889247520827,0.173306359909475],[114.284979222808,35.8434407995082,0.0952527371700853],[115.575310955755,35.3091465411708,0.484106645220891],[115.134050477296,35.4162056455389,0.491830641403794],[114.958742077462,36.0894316178747,0.694420133018866],[114.663795209024,36.0457334751263,0.862112848553807],[114.313599428162,36.1269595697522,0.295992334373295],[114.184896345716,36.8913689688779,0.427227488951758],[114.156887530349,35.763367456384,0.586211750051007],[114.68284904724,36.2148703150451,0.843908769078553],[114.189935336821,35.3105069072917,0.708672792650759],[114.394312515389,36.1139565771446,0.564105642959476],[115.922827908304,36.2944261515513,0.998905403306708],[114.744681966491,35.0827923384495,0.939006636384875],[114.205888592172,36.2631368823349,0.810832544695586],[114.498569146264,35.7806541640311,0.809768246486783],[115.345679306425,36.6570529080927,0.159859792562202],[114.116867086384,36.4609252782539,0.423386453883722],[115.939590536058,35.9804196604528,0.391691979020834],[115.318038565107,36.4873313191347,0.00836498895660043],[114.393471190706,36.6384627390653,0.975759847322479],[114.665693140123,35.7341708848253,0.855335855158046],[114.312539179809,35.4231917452998,0.622042185626924],[116.06404088065,36.7656457461417,0.13180489349179],[114.267732806969,36.2867349176668,0.30856962595135],[115.707641489804,36.4405374270864,0.509752520825714],[115.910334294196,35.4217054098845,0.399357309564948],[115.419538900256,36.1666371999308,0.970769808162004],[115.877346159425,35.1446954524145,0.687870053341612],[114.651159430854,35.9852152112871,0.822353574912995],[114.647910222877,36.2530283522792,0.579103037714958],[114.82874782104,35.3278349805623,0.870516885304824],[114.955308164936,35.7396399239078,0.615888744825497],[114.888820924331,36.5993418935686,0.395341822411865],[114.798955262639,36.90630531637,0.351455410709605],[115.024154360406,36.4525646585971,0.387926355004311],[111.237172848079,32.5391597216949,0.772081254050136],[110.672590971924,32.6494552930817,0.449786951532587],[109.936074021738,32.18624305306,0.467370446072891],[111.404727571178,33.1244750940241,0.456311080837622],[110.811917107552,32.3664086032659,0.365337356459349],[110.746434221044,32.0198096297681,0.567908182740211],[109.588240861893,32.178217574954,0.922160361893475],[110.343951792456,32.662213599775,0.46427071117796],[109.609213553835,31.8064003009349,0.177726400084794],[110.765885411296,31.5116739431396,0.282686685677618],[109.661023441702,32.2811931334436,0.347991718212143],[111.224015200976,31.5654749725945,0.103829241124913],[111.202927615494,33.2134789321572,0.0916258140932769],[110.396176988259,32.7467401372269,0.623366329586133],[110.439496761654,32.252035392914,0.674352252157405],[111.391568545718,33.3356667910703,0.327870036009699],[110.592778121587,32.4368952503428,0.0592196397483349],[110.251998140942,32.6742592058145,0.0483211493119597],[110.264090437908,32.6654726965353,0.0266131388489157],[110.776972335298,32.2654141574167,0.18991574132815],[109.597476337105,32.5251874406822,0.469466464128345],[110.551927324384,32.9569291141815,0.964943998260424],[110.358125779778,32.1444562212564,0.815744184656069],[109.864436837845,32.4123377399519,0.0047878937330097],[111.308236829471,32.1761072329246,0.520225625252351],[109.512114273384,33.2676266189665,0.801161155570298],[111.320197851863,33.0424761264585,0.165095581440255],[109.677099613473,31.7657923670486,0.299933878006414],[111.324465340935,31.8431938588619,0.135068442672491],[109.770251032896,32.5282289898023,0.393875409616157],[110.852767779492,32.952415486332,0.174444798612967],[109.439845628105,32.8144690617919,0.609784492058679],[109.932193956804,33.0223741219379,0.122397898929194],[111.260024249088,32.6309314901009,0.537353001069278],[110.236774771474,32.6469712937251,0.118737339507788],[109.943734493107,31.5803615953773,0.686666664900258],[111.285727763548,32.0607207650319,0.779145398410037],[111.303778895643,32.8999646333978,0.812550274655223],[110.451121000573,32.3480441970751,0.445413396228105],[109.792537958361,32.4985243882984,0.320239326450974],[110.469882999547,32.1796256056987,0.518323067342862],[110.863878117874,31.6340718413703,0.407335276016966],[111.104813130107,32.3061272841878,0.0101069712545723],[110.882576775737,31.6837574783713,0.492155224550515],[109.515663343947,32.6728688348085,0.832166943466291],[111.155286809895,32.5994847910479,0.574939459329471],[109.870494464412,32.0211842395365,0.184921606210992],[109.697021971457,32.4361811215058,0.778904063161463],[111.344064707868,33.0579618993215,0.121809953125194],[111.37057200307,33.345487142913,0.166531904833391],[109.809151215944,32.929353184998,0.859217505436391],[110.061240498442,33.3358623636886,0.751082470873371],[110.922160468996,32.0612700576894,0.918264826294035],[109.924088475294,32.578787077684,0.444412968819961],[109.834763669409,32.4087402052246,0.306683246744797],[110.311369306408,32.6709876842797,0.126226948574185],[110.898064683191,32.5868690251373,0.0292432974092662],[110.154845028184,31.7825460443273,0.85745814605616],[110.598928302061,32.597062358167,0.31260397657752],[100.375294920523,30.4978982899338,0.211926266783848],[100.453231655527,31.3197226976044,0.335835623554885],[101.378654210363,30.7318340903148,0.456845666049048],[100.465138322208,29.9830924444832,0.129262421047315],[101.702035158407,31.4404365066439,0.0538390518631786],[101.70464599086,31.2937811119482,0.332340080291033],[101.538904276211,30.1306337867863,0.864895772421733],[101.257536320947,31.023025942035,0.0325105527881533],[100.484404943418,30.038109538611,0.504721552832052],[101.26545973029,30.1705659581348,0.100118013797328],[101.603002302814,30.4610366127454,0.0509883083868772],[100.698150631972,30.0162236709148,0.539843477774411],[100.388161813375,31.520437928848,0.691042013932019],[100.724112463184,31.909701009281,0.465524285798892],[100.639353724197,31.1553371776827,0.29762823251076],[102.132365098223,31.3251441093162,0.0177286635152996],[101.058488285635,31.5090420818888,0.722784986253828],[102.022961884271,30.6028551426716,0.541336565976962],[101.82443981478,30.4052531388588,0.167768086539581],[101.434022825677,30.7081863763742,0.198771214112639],[100.793295344338,30.4054650240578,0.344211488496512],[100.44006754132,31.6032425179146,0.976313940715045],[100.341468285304,31.8127408423461,0.523517543449998],[101.418807630893,30.5398009195924,0.476536445785314],[100.488111790735,30.8784979949705,0.233045289991423],[100.685635693371,30.5955613316037,0.78830951708369],[100.927498323377,30.8131800969131,0.19345205463469],[100.681394976098,31.8033951837569,0.719906789250672],[101.529845358804,30.1171784633771,0.750518471002579],[101.157467112876,31.2161914212629,0.359271653695032],[100.401857551187,30.7961757639423,0.320365551393479],[100.418908375315,29.9763363837264,0.111278877826408],[101.097480379045,30.0226895930246,0.272844885010272],[100.680120575242,30.3152684769593,0.939185700844973],[101.521503672004,31.3004686627537,0.581550746690482],[100.497604700271,31.3573707691394,0.371154292719439],[101.426192906685,29.9393575643189,0.616284092422575],[100.1998443841,30.7745019597933,0.15559230861254],[101.262812041212,30.0990812131204,0.937914026435465],[101.435446947347,31.3882279596291,0.229502072092146],[101.302002377342,30.1234277510084,0.172703457064927],[100.972082485911,30.3127769012935,0.137734831310809],[100.523887719959,30.2365012620576,0.510717203607783],[101.324855969287,31.8976715169847,0.642699541524053],[100.788759842049,31.7274151979946,0.050392676377669],[101.57281947555,31.8004146339372,0.0229690538253635],[100.503098020796,30.9726223903708,0.922821178333834],[100.342217457481,30.7595949093811,0.667425023857504],[101.075363426935,30.0444550644606,0.387625145493075],[101.829140058253,31.2099946923554,0.525419554207474],[101.128874866292,30.1003923034295,0.146696657175198],[101.405845151283,30.2085280655883,0.503639663336799],[101.48660797812,30.6640049847774,0.429237050935626],[101.255108026788,31.4821887100115,0.7714417015668],[100.55247713672,31.5472639501095,0.885823857504874],[102.074316497426,30.1351443738677,0.854335424490273],[101.331156921573,30.6255377512425,0.0184109341353178],[101.463961826172,30.3451832025312,0.289923863718286],[101.790632201824,30.5269875642844,0.0848882040008903],[100.681332839653,29.955321340356,0.451176926493645],[101.188361314591,31.0252465391532,0.854899797355756],[100.862241369206,30.9954378791153,0.528674854896963],[101.7161944611,31.3629207871854,0.812200752319768],[100.544873375446,31.0762472199276,0.64424455887638],[100.269426086452,31.4455278548412,0.852268456015736],[100.75051331101,29.9734776592813,0.00530246738344431],[101.598012579139,31.7901281868108,0.417084152810276],[100.312942964025,29.9260470974259,0.928156101843342],[107.910940987524,36.425652872771,0.279548495542258],[109.337300920393,36.0348544530571,0.570337947690859],[107.975119933486,36.3108831327409,0.207667588023469],[107.659230482299,35.4899259898812,0.696511822286993],[109.3258818225,35.2959947418422,0.934004223672673],[108.479167857673,36.5500420327298,0.74753289995715],[107.764645496849,35.2885954980738,0.484655034029856],[109.505703719333,36.6199062522501,0.737257928820327],[108.082001817413,36.5323870033026,0.88430382986553],[107.626285413746,35.6814338848926,0.0876856655813754],[107.940243029967,36.2451353673823,0.842273134039715],[108.247668127995,35.0479799732566,0.627595045370981],[107.949882823043,36.2103318599984,0.117374956840649],[108.723390554544,34.8725906675681,0.767719679279253],[109.07507875422,35.8112990534864,0.717374871950597],[108.129425373394,36.2896655420773,0.851929752156138],[108.000920909457,35.429510760121,0.323289635125548],[109.246352726594,35.4242628570646,0.223518156912178],[107.944544765167,25.9538868484087,0.321796341333538],[108.830805394333,25.737911536824,0.908014161046594],[108.936439074576,25.7924348358065,0.37408745335415],[109.157584027853,26.4289485001937,0.533739074598998],[109.57024620939,25.9419220346026,0.172413291642442],[109.345152631402,25.8224171451293,0.271830002311617],[107.930924556684,27.0386882582679,0.271792183164507],[108.654801402241,27.1798377805389,0.789223423693329],[109.639598106034,25.5591648672707,0.125447871396318],[107.947818452958,26.2575739235617,0.845116695621982],[109.211508593522,26.1778054996394,0.705046963179484],[108.1212778599,25.5970598226413,0.361241368344054],[109.208034646232,26.4870232171379,0.949810253456235],[109.408439684194,26.6244016299024,0.571392436278984],[109.346297049895,25.836006956175,0.893984551075846],[109.769102867227,25.684053784702,0.892127286409959],[109.53757794993,26.4648311845958,0.0964815765619278],[108.868581405375,26.0276624956168,0.409326996654272],[109.270043785218,26.5370116098784,0.583566524554044],[108.332091267221,26.5408304664306,0.710219358559698],[108.894810151309,26.6804014490917,0.685667261714116],[108.061657762155,26.2343845395371,0.847279415698722],[109.164503005799,27.4032481564209,0.0799440629780293],[108.089318403509,26.8328556776978,0.528334806673229],[108.767316796817,25.7336801509373,0.809708868386224],[109.587022249587,26.3061650251038,0.644309068564326],[107.92759142397,25.8595075099729,0.0915784840472043],[108.646675990429,25.5303106671199,0.725218147272244],[109.130651986692,27.1325475866906,0.0243648733012378],[109.742084027268,25.9985952014104,0.0225328914821148],[107.767097502016,27.0671338392422,0.438123336061835],[106.331869391724,26.9035227973945,0.697728276485577],[107.36619201256,28.1348243653774,0.205127196852118],[107.085698421579,27.6718124188483,0.0211518832948059],[106.722451824695,26.754275906831,0.141056637978181],[107.382951865438,28.3127426579595,0.274745756061748],[108.036352880299,26.8746191877872,0.173574023647234],[108.215140773449,27.9945141081698,0.920956534333527],[106.652014737949,26.9271464818157,0.701411717571318],[106.311048769858,28.641557703726,0.040120713179931],[107.213924471289,27.5273362887092,0.449485663091764],[107.505458903499,27.0638853381388,0.569039904745296],[106.282303894404,26.8442139956169,0.644532025326043],[107.251889737789,26.7400220478885,0.0343714132905006],[108.215617232025,28.4162327270024,0.211797969648615],[107.016347772442,28.6061349641532,0.721129620214924],[107.49672411615,27.9832223756239,0.948126534931362],[108.153833855875,28.2270203125663,0.961389046860859],[107.610509181861,26.7360613876954,0.985411575064063],[107.13944139285,28.1076271967031,0.376154003664851],[106.395796361379,27.867680859752,0.344207460992038],[106.982624138705,28.4008346293122,0.803638237761334],[108.191331405658,27.6617400692776,0.463208252098411],[108.100510127842,27.2442093058489,0.228315118234605],[107.384279110469,27.6700046774931,0.864328136201948],[106.807862392161,27.4599574087188,0.987698146374896],[106.265005792491,27.4684948702343,0.873983662342653],[106.267098115291,28.13384526968,0.986121844965965],[110.049755983055,35.2658852506429,0.604341967729852],[109.952531921677,35.8120119138621,0.455146271502599],[109.916859765537,35.0452676527202,0.221411712002009],[109.806079586968,36.0864439802244,0.528059331001714],[109.545864991844,34.9447301258333,0.668735772836953],[110.742881948594,35.3477250677533,0.446513783885166],[111.057548480574,36.346356339287,0.930685626110062],[109.614374446217,34.8729107100517,0.54309191997163],[111.030150571372,34.8875395786017,0.844495005439967],[111.04451169027,35.2121007260866,0.119719858514145],[109.475864183158,35.4807755891234,0.263629057444632],[109.65976478532,36.0497853443958,0.0801806773524731],[111.065625638235,35.6504416111857,0.380075078923255],[110.132363738026,35.1663461402059,0.757736681494862],[110.739093091805,35.7772957147099,0.89775653835386],[110.733030874748,35.2686889464967,0.24484586250037],[109.255427691154,35.410470391158,0.0242460102308542],[109.516264144797,35.5184270660393,0.726567541481927],[110.715105186682,35.4433504547924,0.637074542464688],[109.83026670292,36.3377260286361,0.155728231649846],[110.395510008559,34.8652840973809,0.99834880232811],[110.596168857999,35.740992853418,0.664316441630945],[110.82176626334,34.9910098407418,0.887004712363705],[110.744408430997,36.2299499437213,0.734617353882641],[110.305703439284,35.2953923810273,0.0223761620000005],[109.953942921013,35.6032488127239,0.813734999159351],[109.367687587626,35.6983534134924,0.230976194608957],[110.243005865254,36.0446861525998,0.0922980799805373],[110.104799314402,35.4366887304932,0.00685761263594031],[109.444833897054,35.1138298348524,0.183225512271747],[109.757384711877,35.5702675641514,0.848741425899789],[109.439926072024,34.8468685108237,0.337009752634913],[110.698354994878,36.0481265652925,0.978674952639267],[109.255160212982,36.5442996779457,0.356883892323822],[110.350539715495,35.0323681784794,0.0955865404102951],[109.934386195149,35.0220964043401,0.0607908493839204],[109.613317200914,36.1708751088008,0.337948557920754],[110.439288439695,35.8689100318588,0.619451057864353],[110.189360253047,36.5396839417517,0.0153669191058725],[110.374925332144,35.2850216138177,0.827498275320977],[111.138678869233,35.9427012545057,0.773369720205665],[110.636724714655,36.1742435321212,0.111573294736445],[110.046414614189,34.6784765319899,0.243087634444237],[110.165100063663,35.3945515318774,0.48089952301234],[109.827695754357,35.7548330174759,0.287662185495719],[110.219533204567,34.7843214622699,0.928551421966404],[109.805953103583,36.1470773573965,0.27159268874675],[110.337298085447,34.7428973680362,0.738110849168152],[110.836760247592,35.3882726375014,0.847865507937968],[110.625888948329,36.353739424143,0.525171765591949],[109.989861753304,35.9744808557443,0.816513902042061],[111.116077321582,35.7331756441854,0.85486737661995],[111.097150109708,34.8468719045632,0.807996434625238],[110.464399429038,35.9453137367964,0.137271272949874],[110.31643168861,36.6359330490232,0.0469624414108694],[109.425482955761,34.9187589175999,0.474311838159338],[109.47166661825,36.3865113756619,0.88837028760463],[110.166948135477,35.1691548102535,0.687444749521092],[110.748610971961,35.40965406131,0.0139870252460241],[103.162916861475,26.1771929799579,0.864152650116012],[103.075234413147,26.3189114602283,0.765414407476783],[102.596563164145,27.106192399282,0.970115623902529],[101.578409443609,27.906311834231,0.3380212103948],[102.925428696442,27.0278282435611,0.164227185305208],[101.567011071369,27.2995592709631,0.890286330599338],[102.387862534728,27.3113749111071,0.319891837658361],[101.282146384474,27.966938036494,0.926204998977482],[101.70646926621,26.2907782476395,0.0970603793393821],[101.364027968142,27.6416761698201,0.528315157396719],[103.037942828145,27.0140484659933,0.207868771161884],[101.818447189871,27.5766452746466,0.91707555600442],[102.976352433674,27.2099941158667,0.186154841678217],[102.527467514388,26.9962062719278,0.727320312522352],[103.13180247834,26.1245388733223,0.348710503429174],[102.502954262309,27.526695241686,0.85542140295729],[101.960260413121,26.5985275930725,0.0229044836014509],[101.612168804742,27.3310908880085,0.413176994770765],[102.785692995414,27.4687125533819,0.368185152299702],[102.543459631037,26.3628147016279,0.483770362101495],[103.018226788845,27.8083559484221,0.239669239381328],[102.241976971738,26.2728518578224,0.514658764703199],[103.226019752678,27.0123488241807,0.436512214830145],[103.088401145302,27.3430577465333,0.994235723279417],[102.802614429034,26.3683526120149,0.937790828524157],[101.634001844563,27.3082096157596,0.0337740178219974],[102.831170163117,27.5641967882402,0.566619224613532],[102.288357493933,27.007285492029,0.593173924367875],[102.864931804128,26.0756980590522,0.39807418291457],[102.641925914213,27.6634440235794,0.844788066111505],[101.602327964734,27.3716555139981,0.321963729336858],[102.017606189474,27.1167204980738,0.784978142473847],[101.716698439326,26.1741170748137,0.912435194477439],[102.802674264647,26.464642778039,0.405343463411555],[101.574332763907,26.4676169799641,0.187206385890022],[101.341767400969,26.7053837976418,0.00923200394026935],[101.323284809478,27.3907101568766,0.306836285162717],[102.749675380066,26.0346374744549,0.279698611469939],[101.506588429213,27.4113662266172,0.953705580206588],[102.298850892112,27.660763930995,0.586648675845936],[103.171490895096,27.021539860405,0.115752313984558],[101.667658011895,26.5936821964569,0.780436099506915],[102.762813463341,27.5198795930482,0.636822529602796],[102.378302925266,26.9669656758197,0.328653546050191],[101.257060682867,26.9965830636211,0.0981345912441611],[101.725709010381,35.1613343684003,0.355756763368845],[101.732899585739,34.671446560882,0.548886798787862],[101.031086858828,34.8979584723711,0.336891985731199],[100.793658891227,36.4616273120046,0.460623931605369],[100.210798903834,36.5407892060466,0.040492519037798],[102.141272253357,35.962159187533,0.895646359072998],[101.64795172587,35.7574205501005,0.84674834087491],[100.611112083774,36.4936067783274,0.261663410346955],[100.370170724578,35.3418133025989,0.63602434634231],[100.780783744529,36.4493776527233,0.388692539883777],[101.411904322449,35.8565910882317,0.726640080334619],[102.10030630976,34.8072448875755,0.724000577349216],[101.926691961009,34.9455551006831,0.15964993275702],[101.102887965273,34.9283982217312,0.244917353615165],[101.986563386861,35.610638584476,0.740307531086728],[101.306197348051,36.3700126749463,0.798468410037458],[100.802780094091,35.0100557990372,0.626688667805865],[100.759737446904,35.839631063398,0.535668935161084],[100.265068611596,34.7488690800965,0.979554247111082],[100.377692406066,35.2927991142496,0.845276749692857],[100.735742836725,36.150259278249,0.69144411990419],[100.496533236466,36.5261158919893,0.654278878588229],[101.502535869833,36.618096887134,0.152630789438263],[100.886119976174,35.3893318446353,0.457163040526211],[100.691004294902,36.0971567011438,0.235600144369528],[101.776008797344,35.7023644987494,0.665255878586322],[101.511385159101,36.3102299314924,0.887862486066297],[101.805659448728,35.4843434658833,0.201281655346975],[100.329096130095,36.4005549582653,0.546511356718838],[101.428590734024,36.6321560861543,0.101904520997778],[101.465092637111,34.8895152406767,0.430605645058677],[101.770237577613,36.0620697899722,0.441557223210111],[101.339567990508,36.1064977482893,0.896190508967265],[100.32037661504,35.71603323007,0.796846324577928],[102.132613583002,36.4221963332966,0.433941229945049],[100.33217705274,34.6913406453095,0.531057709595188],[100.899789575487,36.5378923187964,0.617682058596984],[101.147073689848,35.7185615398921,0.731479385402054],[101.156594066415,35.2990469792858,0.838511341484264],[111.817040985916,31.6468830746599,0.112302228342742],[112.410975602455,31.4741993062198,0.454200405627489],[111.28067304194,30.5980679406784,0.0552997314371169],[111.775165164843,31.1053567747585,0.644223410636187],[112.424694319256,31.414482595399,0.614981770981103],[112.585951083805,30.7544329571538,0.819689653115347],[111.127514064778,32.2971592834219,0.407540839863941],[110.822374623269,31.5322474916466,0.888512819074094],[112.161058390047,31.9282506937161,0.982541519217193],[112.259456050582,31.8250589142554,0.383045385358855],[111.837225226685,31.6926184557378,0.119345636805519],[110.946911904961,31.9319560374133,0.15640316484496],[112.261827392969,30.9863042179495,0.22544988617301],[111.650778837036,32.2777822143398,0.925541494507343],[110.940105583053,32.004237413872,0.290797243826091],[111.696828547399,31.7485086484812,0.985907574882731],[112.279019459151,30.3925144588575,0.562662529759109],[112.673695266247,31.0647699022666,0.644265110837296],[112.412212624215,31.6980594578199,0.834842927288264],[112.393285795115,30.6880924701691,0.32343189814128],[111.715133483522,31.7537555480376,0.465122549328953],[111.877553731203,30.7867516302504,0.0502695285249501],[112.224315188359,32.0234833760187,0.710109694628045],[111.819715580903,30.856089158915,0.200341384392232],[111.319122963119,30.6521280640736,0.592296618735418],[110.804403284099,31.9894656189717,0.959518746007234],[112.631622662768,31.6946395109408,0.661983538651839],[111.458091903012,31.7968547055498,0.279170849593356],[111.104894670658,32.2800202541985,0.111379844835028],[112.116762428079,31.0249507473782,0.54876318690367],[111.794571321458,30.3549214848317,0.682005626149476],[112.02404523408,31.8033140185289,0.278983232798055],[112.142202586401,31.3129645721056,0.862658358411863],[110.867680850904,30.7857264461927,0.954418701119721],[111.454719607253,32.0050448179245,0.749646686483175],[111.761676839553,30.5908408099785,0.802353593287989],[112.619675141294,32.2552221086808,0.306859420146793],[111.900078394916,30.3210827838629,0.205743129597977],[112.127557932865,31.7022389206104,0.69504066137597],[112.623866543174,30.7933874381706,0.620738212252036],[112.586656977888,32.0918810046278,0.347568192752078],[112.272684282623,31.7845238549635,0.408507582498714],[110.96811854979,31.8878571218811,0.0554710105061531],[111.887117475271,31.9076569112949,0.881291751749814],[111.591818868183,31.167512846645,0.533382020192221],[112.389750699513,30.3219906035811,0.247096308041364],[111.161253211554,30.4293143777177,0.292285963427275],[112.378358156886,31.8970341295935,0.516328450059518],[110.949253783561,31.1307641994208,0.632351824780926],[112.09921915736,32.0904586985707,0.0115289010573179],[111.123653478455,31.1869155620225,0.93978477967903],[111.685264118016,31.3715923214331,0.111573433736339],[112.619993553031,31.0191388293169,0.786687827669084],[111.764553630725,31.0459357537329,0.249109964584932],[112.637526193168,31.7215500464663,0.481037696124986],[110.42259548977,26.108027363196,0.0761433157604188],[110.569219023455,26.4025496887043,0.710267225280404],[109.886639010627,25.4235166464932,0.4471337844152],[110.535575295333,25.453234822955,0.317229362903163],[111.038003674243,25.0378275769763,0.359604625031352],[109.146750597749,26.4965159865096,0.179046803386882]],"gradientColors":["blue","cyan","limegreen","yellow","orange","red"],"blurSize":30,"minAlpha":0.05,"valueScale":1,"opacity":1}}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"cross","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":false},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"top","orient":"horizontal"},"legend":{"show":true,"data":[],"x":"left","y":"top","orient":"horizontal"}},"evals":[],"jsHooks":[]}</script>
<hr />
<p>You can refer to related functions to play around on your own.</p>
</div>
</div>

<script type="text/javascript">
window.onload = function() {
  var i, fig = 1, caps = document.getElementsByClassName('caption');
  for (i = 0; i < caps.length; i++) {
    var cap = caps[i];
    if (cap.parentElement.className !== 'figure' || cap.nodeName !== 'P')
      continue;
    cap.innerHTML = '<span>Figure ' + fig + ':</span> ' + cap.innerHTML;
    fig++;
  }
  fig = 1;
  caps = document.getElementsByTagName('caption');
  for (i = 0; i < caps.length; i++) {
    var cap = caps[i];
    if (cap.parentElement.nodeName !== 'TABLE') continue;
    cap.innerHTML = '<span>Table ' + fig + ':</span> ' + cap.innerHTML;
    fig++;
  }
}
</script>



</div>

<script>

// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
  $('tr.header').parent('thead').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
  bootstrapStylePandocTables();
});


</script>

<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
  (function () {
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.src  = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
    document.getElementsByTagName("head")[0].appendChild(script);
  })();
</script>

</body>
</html>
